mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-199f9b66c0a2b2e4/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#[cfg(feature = "arbitrary")]
5use arbitrary::Arbitrary;
6#[allow(unused_imports)]
7use bitflags::bitflags;
8use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
9#[allow(unused_imports)]
10use num_derive::FromPrimitive;
11#[allow(unused_imports)]
12use num_derive::ToPrimitive;
13#[allow(unused_imports)]
14use num_traits::FromPrimitive;
15#[allow(unused_imports)]
16use num_traits::ToPrimitive;
17#[cfg(feature = "serde")]
18use serde::{Deserialize, Serialize};
19bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
20impl MavModeProperty {
21    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
22}
23impl Default for MavModeProperty {
24    fn default() -> Self {
25        Self::DEFAULT
26    }
27}
28bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
29impl MavProtocolCapability {
30    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
31}
32impl Default for MavProtocolCapability {
33    fn default() -> Self {
34        Self::DEFAULT
35    }
36}
37#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
38#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
39#[cfg_attr(feature = "serde", serde(tag = "type"))]
40#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
41#[repr(u32)]
42#[doc = "Generalized UAVCAN node mode"]
43pub enum UavcanNodeMode {
44    #[doc = "The node is performing its primary functions."]
45    UAVCAN_NODE_MODE_OPERATIONAL = 0,
46    #[doc = "The node is initializing; this mode is entered immediately after startup."]
47    UAVCAN_NODE_MODE_INITIALIZATION = 1,
48    #[doc = "The node is under maintenance."]
49    UAVCAN_NODE_MODE_MAINTENANCE = 2,
50    #[doc = "The node is in the process of updating its software."]
51    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
52    #[doc = "The node is no longer available online."]
53    UAVCAN_NODE_MODE_OFFLINE = 7,
54}
55impl UavcanNodeMode {
56    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
57}
58impl Default for UavcanNodeMode {
59    fn default() -> Self {
60        Self::DEFAULT
61    }
62}
63#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
64#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
65#[cfg_attr(feature = "serde", serde(tag = "type"))]
66#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
67#[repr(u32)]
68pub enum MavOdidStatus {
69    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
70    MAV_ODID_STATUS_UNDECLARED = 0,
71    #[doc = "The UA is on the ground."]
72    MAV_ODID_STATUS_GROUND = 1,
73    #[doc = "The UA is in the air."]
74    MAV_ODID_STATUS_AIRBORNE = 2,
75    #[doc = "The UA is having an emergency."]
76    MAV_ODID_STATUS_EMERGENCY = 3,
77    #[doc = "The remote ID system is failing or unreliable in some way."]
78    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
79}
80impl MavOdidStatus {
81    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
82}
83impl Default for MavOdidStatus {
84    fn default() -> Self {
85        Self::DEFAULT
86    }
87}
88#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
89#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
90#[cfg_attr(feature = "serde", serde(tag = "type"))]
91#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
92#[repr(u32)]
93#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
94pub enum MavDataStream {
95    #[doc = "Enable all data streams"]
96    MAV_DATA_STREAM_ALL = 0,
97    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
98    MAV_DATA_STREAM_RAW_SENSORS = 1,
99    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
100    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
101    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
102    MAV_DATA_STREAM_RC_CHANNELS = 3,
103    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
104    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
105    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
106    MAV_DATA_STREAM_POSITION = 6,
107    #[doc = "Dependent on the autopilot"]
108    MAV_DATA_STREAM_EXTRA1 = 10,
109    #[doc = "Dependent on the autopilot"]
110    MAV_DATA_STREAM_EXTRA2 = 11,
111    #[doc = "Dependent on the autopilot"]
112    MAV_DATA_STREAM_EXTRA3 = 12,
113}
114impl MavDataStream {
115    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
116}
117impl Default for MavDataStream {
118    fn default() -> Self {
119        Self::DEFAULT
120    }
121}
122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
124#[cfg_attr(feature = "serde", serde(tag = "type"))]
125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
126#[repr(u32)]
127#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
128pub enum CellularNetworkFailedReason {
129    #[doc = "No error"]
130    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
131    #[doc = "Error state is unknown"]
132    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
133    #[doc = "SIM is required for the modem but missing"]
134    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
135    #[doc = "SIM is available, but not usable for connection"]
136    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
137}
138impl CellularNetworkFailedReason {
139    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
140}
141impl Default for CellularNetworkFailedReason {
142    fn default() -> Self {
143        Self::DEFAULT
144    }
145}
146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
148#[cfg_attr(feature = "serde", serde(tag = "type"))]
149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
150#[repr(u32)]
151#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
152pub enum MavFuelType {
153    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
154    MAV_FUEL_TYPE_UNKNOWN = 0,
155    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
156    MAV_FUEL_TYPE_LIQUID = 1,
157    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
158    MAV_FUEL_TYPE_GAS = 2,
159}
160impl MavFuelType {
161    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
162}
163impl Default for MavFuelType {
164    fn default() -> Self {
165        Self::DEFAULT
166    }
167}
168bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
169impl PositionTargetTypemask {
170    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
171}
172impl Default for PositionTargetTypemask {
173    fn default() -> Self {
174        Self::DEFAULT
175    }
176}
177#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
179#[cfg_attr(feature = "serde", serde(tag = "type"))]
180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
181#[repr(u32)]
182#[doc = "Source of information about this collision."]
183pub enum MavCollisionSrc {
184    #[doc = "ID field references ADSB_VEHICLE packets"]
185    MAV_COLLISION_SRC_ADSB = 0,
186    #[doc = "ID field references MAVLink SRC ID"]
187    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
188}
189impl MavCollisionSrc {
190    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
191}
192impl Default for MavCollisionSrc {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
198impl MavPowerStatus {
199    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
200}
201impl Default for MavPowerStatus {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
207impl MavGeneratorStatusFlag {
208    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
209}
210impl Default for MavGeneratorStatusFlag {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
217#[cfg_attr(feature = "serde", serde(tag = "type"))]
218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
219#[repr(u32)]
220#[doc = "Cellular network radio type"]
221pub enum CellularNetworkRadioType {
222    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
223    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
224    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
225    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
226    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
227}
228impl CellularNetworkRadioType {
229    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
230}
231impl Default for CellularNetworkRadioType {
232    fn default() -> Self {
233        Self::DEFAULT
234    }
235}
236#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
238#[cfg_attr(feature = "serde", serde(tag = "type"))]
239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
240#[repr(u32)]
241#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
242pub enum FirmwareVersionType {
243    #[doc = "development release"]
244    FIRMWARE_VERSION_TYPE_DEV = 0,
245    #[doc = "alpha release"]
246    FIRMWARE_VERSION_TYPE_ALPHA = 64,
247    #[doc = "beta release"]
248    FIRMWARE_VERSION_TYPE_BETA = 128,
249    #[doc = "release candidate"]
250    FIRMWARE_VERSION_TYPE_RC = 192,
251    #[doc = "official stable release"]
252    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
253}
254impl FirmwareVersionType {
255    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
256}
257impl Default for FirmwareVersionType {
258    fn default() -> Self {
259        Self::DEFAULT
260    }
261}
262#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
264#[cfg_attr(feature = "serde", serde(tag = "type"))]
265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
266#[repr(u32)]
267#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
268pub enum MavStandardMode {
269    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
270    MAV_STANDARD_MODE_NON_STANDARD = 0,
271    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
272    MAV_STANDARD_MODE_POSITION_HOLD = 1,
273    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
274    MAV_STANDARD_MODE_ORBIT = 2,
275    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
276    MAV_STANDARD_MODE_CRUISE = 3,
277    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
278    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
279    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
280    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
281    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
282    MAV_STANDARD_MODE_MISSION = 6,
283    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
284    MAV_STANDARD_MODE_LAND = 7,
285    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
286    MAV_STANDARD_MODE_TAKEOFF = 8,
287}
288impl MavStandardMode {
289    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
290}
291impl Default for MavStandardMode {
292    fn default() -> Self {
293        Self::DEFAULT
294    }
295}
296#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
298#[cfg_attr(feature = "serde", serde(tag = "type"))]
299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
300#[repr(u32)]
301pub enum MavlinkDataStreamType {
302    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
303    MAVLINK_DATA_STREAM_IMG_BMP = 1,
304    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
305    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
306    MAVLINK_DATA_STREAM_IMG_PGM = 4,
307    MAVLINK_DATA_STREAM_IMG_PNG = 5,
308}
309impl MavlinkDataStreamType {
310    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
311}
312impl Default for MavlinkDataStreamType {
313    fn default() -> Self {
314        Self::DEFAULT
315    }
316}
317bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
318impl HighresImuUpdatedFlags {
319    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
320}
321impl Default for HighresImuUpdatedFlags {
322    fn default() -> Self {
323        Self::DEFAULT
324    }
325}
326#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
328#[cfg_attr(feature = "serde", serde(tag = "type"))]
329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
330#[repr(u32)]
331#[doc = "Actions being taken to mitigate/prevent fence breach"]
332pub enum FenceMitigate {
333    #[doc = "Unknown"]
334    FENCE_MITIGATE_UNKNOWN = 0,
335    #[doc = "No actions being taken"]
336    FENCE_MITIGATE_NONE = 1,
337    #[doc = "Velocity limiting active to prevent breach"]
338    FENCE_MITIGATE_VEL_LIMIT = 2,
339}
340impl FenceMitigate {
341    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
342}
343impl Default for FenceMitigate {
344    fn default() -> Self {
345        Self::DEFAULT
346    }
347}
348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
350#[cfg_attr(feature = "serde", serde(tag = "type"))]
351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
352#[repr(u32)]
353#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
354pub enum MavBatteryMode {
355    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
356    MAV_BATTERY_MODE_UNKNOWN = 0,
357    #[doc = "Battery is auto discharging (towards storage level)."]
358    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
359    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
360    MAV_BATTERY_MODE_HOT_SWAP = 2,
361}
362impl MavBatteryMode {
363    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
364}
365impl Default for MavBatteryMode {
366    fn default() -> Self {
367        Self::DEFAULT
368    }
369}
370bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
371impl HilActuatorControlsFlags {
372    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
373}
374impl Default for HilActuatorControlsFlags {
375    fn default() -> Self {
376        Self::DEFAULT
377    }
378}
379#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
381#[cfg_attr(feature = "serde", serde(tag = "type"))]
382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
383#[repr(u32)]
384pub enum MavOdidArmStatus {
385    #[doc = "Passing arming checks."]
386    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
387    #[doc = "Generic arming failure, see error string for details."]
388    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
389}
390impl MavOdidArmStatus {
391    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
392}
393impl Default for MavOdidArmStatus {
394    fn default() -> Self {
395        Self::DEFAULT
396    }
397}
398bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
399impl AdsbFlags {
400    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
401}
402impl Default for AdsbFlags {
403    fn default() -> Self {
404        Self::DEFAULT
405    }
406}
407bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
408impl MavSysStatusSensor {
409    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
410}
411impl Default for MavSysStatusSensor {
412    fn default() -> Self {
413        Self::DEFAULT
414    }
415}
416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
418#[cfg_attr(feature = "serde", serde(tag = "type"))]
419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
420#[repr(u32)]
421pub enum MavOdidOperatorLocationType {
422    #[doc = "The location/altitude of the operator is the same as the take-off location."]
423    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
424    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
425    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
426    #[doc = "The location/altitude of the operator are fixed values."]
427    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
428}
429impl MavOdidOperatorLocationType {
430    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
431}
432impl Default for MavOdidOperatorLocationType {
433    fn default() -> Self {
434        Self::DEFAULT
435    }
436}
437#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
439#[cfg_attr(feature = "serde", serde(tag = "type"))]
440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
441#[repr(u32)]
442#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
443pub enum CameraZoomType {
444    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
445    ZOOM_TYPE_STEP = 0,
446    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
447    ZOOM_TYPE_CONTINUOUS = 1,
448    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
449    ZOOM_TYPE_RANGE = 2,
450    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
451    ZOOM_TYPE_FOCAL_LENGTH = 3,
452    #[doc = "Zoom value as horizontal field of view in degrees."]
453    ZOOM_TYPE_HORIZONTAL_FOV = 4,
454}
455impl CameraZoomType {
456    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
457}
458impl Default for CameraZoomType {
459    fn default() -> Self {
460        Self::DEFAULT
461    }
462}
463#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
465#[cfg_attr(feature = "serde", serde(tag = "type"))]
466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
467#[repr(u32)]
468#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
469pub enum MavFtpErr {
470    #[doc = "None: No error"]
471    MAV_FTP_ERR_NONE = 0,
472    #[doc = "Fail: Unknown failure"]
473    MAV_FTP_ERR_FAIL = 1,
474    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
475    MAV_FTP_ERR_FAILERRNO = 2,
476    #[doc = "InvalidDataSize: Payload size is invalid"]
477    MAV_FTP_ERR_INVALIDDATASIZE = 3,
478    #[doc = "InvalidSession: Session is not currently open"]
479    MAV_FTP_ERR_INVALIDSESSION = 4,
480    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
481    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
482    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
483    MAV_FTP_ERR_EOF = 6,
484    #[doc = "UnknownCommand: Unknown command / opcode"]
485    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
486    #[doc = "FileExists: File/directory already exists"]
487    MAV_FTP_ERR_FILEEXISTS = 8,
488    #[doc = "FileProtected: File/directory is write protected"]
489    MAV_FTP_ERR_FILEPROTECTED = 9,
490    #[doc = "FileNotFound: File/directory not found"]
491    MAV_FTP_ERR_FILENOTFOUND = 10,
492}
493impl MavFtpErr {
494    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
495}
496impl Default for MavFtpErr {
497    fn default() -> Self {
498        Self::DEFAULT
499    }
500}
501#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
503#[cfg_attr(feature = "serde", serde(tag = "type"))]
504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
505#[repr(u32)]
506#[doc = "Enumeration of battery functions"]
507pub enum MavBatteryFunction {
508    #[doc = "Battery function is unknown"]
509    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
510    #[doc = "Battery supports all flight systems"]
511    MAV_BATTERY_FUNCTION_ALL = 1,
512    #[doc = "Battery for the propulsion system"]
513    MAV_BATTERY_FUNCTION_PROPULSION = 2,
514    #[doc = "Avionics battery"]
515    MAV_BATTERY_FUNCTION_AVIONICS = 3,
516    #[doc = "Payload battery"]
517    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
518}
519impl MavBatteryFunction {
520    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
521}
522impl Default for MavBatteryFunction {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
528impl EstimatorStatusFlags {
529    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
530}
531impl Default for EstimatorStatusFlags {
532    fn default() -> Self {
533        Self::DEFAULT
534    }
535}
536#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
538#[cfg_attr(feature = "serde", serde(tag = "type"))]
539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
540#[repr(u32)]
541#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
542pub enum MavFtpOpcode {
543    #[doc = "None. Ignored, always ACKed"]
544    MAV_FTP_OPCODE_NONE = 0,
545    #[doc = "TerminateSession: Terminates open Read session"]
546    MAV_FTP_OPCODE_TERMINATESESSION = 1,
547    #[doc = "ResetSessions: Terminates all open read sessions"]
548    MAV_FTP_OPCODE_RESETSESSION = 2,
549    #[doc = "ListDirectory. List files and directories in path from offset"]
550    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
551    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
552    MAV_FTP_OPCODE_OPENFILERO = 4,
553    #[doc = "ReadFile: Reads size bytes from offset in session"]
554    MAV_FTP_OPCODE_READFILE = 5,
555    #[doc = "CreateFile: Creates file at path for writing, returns session"]
556    MAV_FTP_OPCODE_CREATEFILE = 6,
557    #[doc = "WriteFile: Writes size bytes to offset in session"]
558    MAV_FTP_OPCODE_WRITEFILE = 7,
559    #[doc = "RemoveFile: Remove file at path"]
560    MAV_FTP_OPCODE_REMOVEFILE = 8,
561    #[doc = "CreateDirectory: Creates directory at path"]
562    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
563    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
564    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
565    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
566    MAV_FTP_OPCODE_OPENFILEWO = 11,
567    #[doc = "TruncateFile: Truncate file at path to offset length"]
568    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
569    #[doc = "Rename: Rename path1 to path2"]
570    MAV_FTP_OPCODE_RENAME = 13,
571    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
572    MAV_FTP_OPCODE_CALCFILECRC = 14,
573    #[doc = "BurstReadFile: Burst download session file"]
574    MAV_FTP_OPCODE_BURSTREADFILE = 15,
575    #[doc = "ACK: ACK response"]
576    MAV_FTP_OPCODE_ACK = 128,
577    #[doc = "NAK: NAK response"]
578    MAV_FTP_OPCODE_NAK = 129,
579}
580impl MavFtpOpcode {
581    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
582}
583impl Default for MavFtpOpcode {
584    fn default() -> Self {
585        Self::DEFAULT
586    }
587}
588#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
590#[cfg_attr(feature = "serde", serde(tag = "type"))]
591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
592#[repr(u32)]
593#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
594pub enum MavSeverity {
595    #[doc = "System is unusable. This is a \"panic\" condition."]
596    MAV_SEVERITY_EMERGENCY = 0,
597    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
598    MAV_SEVERITY_ALERT = 1,
599    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
600    MAV_SEVERITY_CRITICAL = 2,
601    #[doc = "Indicates an error in secondary/redundant systems."]
602    MAV_SEVERITY_ERROR = 3,
603    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
604    MAV_SEVERITY_WARNING = 4,
605    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
606    MAV_SEVERITY_NOTICE = 5,
607    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
608    MAV_SEVERITY_INFO = 6,
609    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
610    MAV_SEVERITY_DEBUG = 7,
611}
612impl MavSeverity {
613    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
614}
615impl Default for MavSeverity {
616    fn default() -> Self {
617        Self::DEFAULT
618    }
619}
620#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
622#[cfg_attr(feature = "serde", serde(tag = "type"))]
623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
624#[repr(u32)]
625#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
626pub enum RcSubType {
627    #[doc = "Spektrum DSM2"]
628    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
629    #[doc = "Spektrum DSMX"]
630    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
631    #[doc = "Spektrum DSMX8"]
632    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
633}
634impl RcSubType {
635    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
636}
637impl Default for RcSubType {
638    fn default() -> Self {
639        Self::DEFAULT
640    }
641}
642#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
644#[cfg_attr(feature = "serde", serde(tag = "type"))]
645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
646#[repr(u32)]
647#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
648pub enum SetFocusType {
649    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
650    FOCUS_TYPE_STEP = 0,
651    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
652    FOCUS_TYPE_CONTINUOUS = 1,
653    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
654    FOCUS_TYPE_RANGE = 2,
655    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
656    FOCUS_TYPE_METERS = 3,
657    #[doc = "Focus automatically."]
658    FOCUS_TYPE_AUTO = 4,
659    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
660    FOCUS_TYPE_AUTO_SINGLE = 5,
661    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
662    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
663}
664impl SetFocusType {
665    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
666}
667impl Default for SetFocusType {
668    fn default() -> Self {
669        Self::DEFAULT
670    }
671}
672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
674#[cfg_attr(feature = "serde", serde(tag = "type"))]
675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
676#[repr(u32)]
677#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
678pub enum MavAutopilot {
679    #[doc = "Generic autopilot, full support for everything"]
680    MAV_AUTOPILOT_GENERIC = 0,
681    #[doc = "Reserved for future use."]
682    MAV_AUTOPILOT_RESERVED = 1,
683    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
684    MAV_AUTOPILOT_SLUGS = 2,
685    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
686    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
687    #[doc = "OpenPilot, <http://openpilot.org>"]
688    MAV_AUTOPILOT_OPENPILOT = 4,
689    #[doc = "Generic autopilot only supporting simple waypoints"]
690    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
691    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
692    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
693    #[doc = "Generic autopilot supporting the full mission command set"]
694    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
695    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
696    MAV_AUTOPILOT_INVALID = 8,
697    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
698    MAV_AUTOPILOT_PPZ = 9,
699    #[doc = "UAV Dev Board"]
700    MAV_AUTOPILOT_UDB = 10,
701    #[doc = "FlexiPilot"]
702    MAV_AUTOPILOT_FP = 11,
703    #[doc = "PX4 Autopilot - <http://px4.io/>"]
704    MAV_AUTOPILOT_PX4 = 12,
705    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
706    MAV_AUTOPILOT_SMACCMPILOT = 13,
707    #[doc = "AutoQuad -- <http://autoquad.org>"]
708    MAV_AUTOPILOT_AUTOQUAD = 14,
709    #[doc = "Armazila -- <http://armazila.com>"]
710    MAV_AUTOPILOT_ARMAZILA = 15,
711    #[doc = "Aerob -- <http://aerob.ru>"]
712    MAV_AUTOPILOT_AEROB = 16,
713    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
714    MAV_AUTOPILOT_ASLUAV = 17,
715    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
716    MAV_AUTOPILOT_SMARTAP = 18,
717    #[doc = "AirRails - <http://uaventure.com>"]
718    MAV_AUTOPILOT_AIRRAILS = 19,
719    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
720    MAV_AUTOPILOT_REFLEX = 20,
721}
722impl MavAutopilot {
723    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
724}
725impl Default for MavAutopilot {
726    fn default() -> Self {
727        Self::DEFAULT
728    }
729}
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
760#[cfg_attr(feature = "serde", serde(tag = "type"))]
761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
762#[repr(u32)]
763#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
764pub enum RebootShutdownConditions {
765    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
766    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
767    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
768    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
769}
770impl RebootShutdownConditions {
771    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
772}
773impl Default for RebootShutdownConditions {
774    fn default() -> Self {
775        Self::DEFAULT
776    }
777}
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
784pub enum RcType {
785    #[doc = "Spektrum"]
786    RC_TYPE_SPEKTRUM = 0,
787    #[doc = "CRSF"]
788    RC_TYPE_CRSF = 1,
789}
790impl RcType {
791    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
792}
793impl Default for RcType {
794    fn default() -> Self {
795        Self::DEFAULT
796    }
797}
798#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
800#[cfg_attr(feature = "serde", serde(tag = "type"))]
801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
802#[repr(u32)]
803pub enum GsmLinkType {
804    #[doc = "no service"]
805    GSM_LINK_TYPE_NONE = 0,
806    #[doc = "link type unknown"]
807    GSM_LINK_TYPE_UNKNOWN = 1,
808    #[doc = "2G (GSM/GRPS/EDGE) link"]
809    GSM_LINK_TYPE_2G = 2,
810    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
811    GSM_LINK_TYPE_3G = 3,
812    #[doc = "4G link (LTE)"]
813    GSM_LINK_TYPE_4G = 4,
814}
815impl GsmLinkType {
816    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
817}
818impl Default for GsmLinkType {
819    fn default() -> Self {
820        Self::DEFAULT
821    }
822}
823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
825#[cfg_attr(feature = "serde", serde(tag = "type"))]
826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
827#[repr(u32)]
828pub enum MavOdidClassEu {
829    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
830    MAV_ODID_CLASS_EU_UNDECLARED = 0,
831    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
832    MAV_ODID_CLASS_EU_CLASS_0 = 1,
833    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
834    MAV_ODID_CLASS_EU_CLASS_1 = 2,
835    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
836    MAV_ODID_CLASS_EU_CLASS_2 = 3,
837    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
838    MAV_ODID_CLASS_EU_CLASS_3 = 4,
839    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
840    MAV_ODID_CLASS_EU_CLASS_4 = 5,
841    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
842    MAV_ODID_CLASS_EU_CLASS_5 = 6,
843    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
844    MAV_ODID_CLASS_EU_CLASS_6 = 7,
845}
846impl MavOdidClassEu {
847    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
848}
849impl Default for MavOdidClassEu {
850    fn default() -> Self {
851        Self::DEFAULT
852    }
853}
854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
856#[cfg_attr(feature = "serde", serde(tag = "type"))]
857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
858#[repr(u32)]
859#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
860pub enum ParachuteAction {
861    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
862    PARACHUTE_DISABLE = 0,
863    #[doc = "Enable auto-release of parachute."]
864    PARACHUTE_ENABLE = 1,
865    #[doc = "Release parachute and kill motors."]
866    PARACHUTE_RELEASE = 2,
867}
868impl ParachuteAction {
869    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
870}
871impl Default for ParachuteAction {
872    fn default() -> Self {
873        Self::DEFAULT
874    }
875}
876#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
878#[cfg_attr(feature = "serde", serde(tag = "type"))]
879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
880#[repr(u32)]
881#[doc = "Type of GPS fix"]
882pub enum GpsFixType {
883    #[doc = "No GPS connected"]
884    GPS_FIX_TYPE_NO_GPS = 0,
885    #[doc = "No position information, GPS is connected"]
886    GPS_FIX_TYPE_NO_FIX = 1,
887    #[doc = "2D position"]
888    GPS_FIX_TYPE_2D_FIX = 2,
889    #[doc = "3D position"]
890    GPS_FIX_TYPE_3D_FIX = 3,
891    #[doc = "DGPS/SBAS aided 3D position"]
892    GPS_FIX_TYPE_DGPS = 4,
893    #[doc = "RTK float, 3D position"]
894    GPS_FIX_TYPE_RTK_FLOAT = 5,
895    #[doc = "RTK Fixed, 3D position"]
896    GPS_FIX_TYPE_RTK_FIXED = 6,
897    #[doc = "Static fixed, typically used for base stations"]
898    GPS_FIX_TYPE_STATIC = 7,
899    #[doc = "PPP, 3D position."]
900    GPS_FIX_TYPE_PPP = 8,
901}
902impl GpsFixType {
903    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
904}
905impl Default for GpsFixType {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
920impl GimbalManagerFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
922}
923impl Default for GimbalManagerFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
930#[cfg_attr(feature = "serde", serde(tag = "type"))]
931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
932#[repr(u32)]
933#[doc = "Direction of VTOL transition"]
934pub enum VtolTransitionHeading {
935    #[doc = "Respect the heading configuration of the vehicle."]
936    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
937    #[doc = "Use the heading pointing towards the next waypoint."]
938    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
939    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
940    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
941    #[doc = "Use the specified heading in parameter 4."]
942    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
943    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
944    VTOL_TRANSITION_HEADING_ANY = 4,
945}
946impl VtolTransitionHeading {
947    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
948}
949impl Default for VtolTransitionHeading {
950    fn default() -> Self {
951        Self::DEFAULT
952    }
953}
954#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
956#[cfg_attr(feature = "serde", serde(tag = "type"))]
957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
958#[repr(u32)]
959#[doc = "Camera tracking modes"]
960pub enum CameraTrackingMode {
961    #[doc = "Not tracking"]
962    CAMERA_TRACKING_MODE_NONE = 0,
963    #[doc = "Target is a point"]
964    CAMERA_TRACKING_MODE_POINT = 1,
965    #[doc = "Target is a rectangle"]
966    CAMERA_TRACKING_MODE_RECTANGLE = 2,
967}
968impl CameraTrackingMode {
969    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
970}
971impl Default for CameraTrackingMode {
972    fn default() -> Self {
973        Self::DEFAULT
974    }
975}
976bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
977impl AttitudeTargetTypemask {
978    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
979}
980impl Default for AttitudeTargetTypemask {
981    fn default() -> Self {
982        Self::DEFAULT
983    }
984}
985#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
987#[cfg_attr(feature = "serde", serde(tag = "type"))]
988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
989#[repr(u32)]
990#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
991pub enum MavGoto {
992    #[doc = "Hold at the current position."]
993    MAV_GOTO_DO_HOLD = 0,
994    #[doc = "Continue with the next item in mission execution."]
995    MAV_GOTO_DO_CONTINUE = 1,
996    #[doc = "Hold at the current position of the system"]
997    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
998    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
999    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
1000}
1001impl MavGoto {
1002    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
1003}
1004impl Default for MavGoto {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1010impl HlFailureFlag {
1011    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1012}
1013impl Default for HlFailureFlag {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1019impl IlluminatorErrorFlags {
1020    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1021}
1022impl Default for IlluminatorErrorFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1029#[cfg_attr(feature = "serde", serde(tag = "type"))]
1030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1031#[repr(u32)]
1032#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
1033pub enum CompMetadataType {
1034    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
1035    COMP_METADATA_TYPE_GENERAL = 0,
1036    #[doc = "Parameter meta data."]
1037    COMP_METADATA_TYPE_PARAMETER = 1,
1038    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
1039    COMP_METADATA_TYPE_COMMANDS = 2,
1040    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
1041    COMP_METADATA_TYPE_PERIPHERALS = 3,
1042    #[doc = "Meta data for the events interface."]
1043    COMP_METADATA_TYPE_EVENTS = 4,
1044    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
1045    COMP_METADATA_TYPE_ACTUATORS = 5,
1046}
1047impl CompMetadataType {
1048    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
1049}
1050impl Default for CompMetadataType {
1051    fn default() -> Self {
1052        Self::DEFAULT
1053    }
1054}
1055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1057#[cfg_attr(feature = "serde", serde(tag = "type"))]
1058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1059#[repr(u32)]
1060#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
1061pub enum CameraSource {
1062    #[doc = "Default camera source."]
1063    CAMERA_SOURCE_DEFAULT = 0,
1064    #[doc = "RGB camera source."]
1065    CAMERA_SOURCE_RGB = 1,
1066    #[doc = "IR camera source."]
1067    CAMERA_SOURCE_IR = 2,
1068    #[doc = "NDVI camera source."]
1069    CAMERA_SOURCE_NDVI = 3,
1070}
1071impl CameraSource {
1072    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
1073}
1074impl Default for CameraSource {
1075    fn default() -> Self {
1076        Self::DEFAULT
1077    }
1078}
1079#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1081#[cfg_attr(feature = "serde", serde(tag = "type"))]
1082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1083#[repr(u32)]
1084pub enum MagCalStatus {
1085    MAG_CAL_NOT_STARTED = 0,
1086    MAG_CAL_WAITING_TO_START = 1,
1087    MAG_CAL_RUNNING_STEP_ONE = 2,
1088    MAG_CAL_RUNNING_STEP_TWO = 3,
1089    MAG_CAL_SUCCESS = 4,
1090    MAG_CAL_FAILED = 5,
1091    MAG_CAL_BAD_ORIENTATION = 6,
1092    MAG_CAL_BAD_RADIUS = 7,
1093}
1094impl MagCalStatus {
1095    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1096}
1097impl Default for MagCalStatus {
1098    fn default() -> Self {
1099        Self::DEFAULT
1100    }
1101}
1102#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1104#[cfg_attr(feature = "serde", serde(tag = "type"))]
1105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1106#[repr(u32)]
1107pub enum MavOdidDescType {
1108    #[doc = "Optional free-form text description of the purpose of the flight."]
1109    MAV_ODID_DESC_TYPE_TEXT = 0,
1110    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
1111    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
1112    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
1113    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
1114}
1115impl MavOdidDescType {
1116    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
1117}
1118impl Default for MavOdidDescType {
1119    fn default() -> Self {
1120        Self::DEFAULT
1121    }
1122}
1123#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1125#[cfg_attr(feature = "serde", serde(tag = "type"))]
1126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1127#[repr(u32)]
1128#[doc = "Type of landing target"]
1129pub enum LandingTargetType {
1130    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1131    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1132    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1133    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1134    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1135    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1136    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1137    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1138}
1139impl LandingTargetType {
1140    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1141}
1142impl Default for LandingTargetType {
1143    fn default() -> Self {
1144        Self::DEFAULT
1145    }
1146}
1147bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1148impl HilSensorUpdatedFlags {
1149    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1150}
1151impl Default for HilSensorUpdatedFlags {
1152    fn default() -> Self {
1153        Self::DEFAULT
1154    }
1155}
1156#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1158#[cfg_attr(feature = "serde", serde(tag = "type"))]
1159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1160#[repr(u32)]
1161#[doc = "Video stream encodings"]
1162pub enum VideoStreamEncoding {
1163    #[doc = "Stream encoding is unknown"]
1164    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
1165    #[doc = "Stream encoding is H.264"]
1166    VIDEO_STREAM_ENCODING_H264 = 1,
1167    #[doc = "Stream encoding is H.265"]
1168    VIDEO_STREAM_ENCODING_H265 = 2,
1169}
1170impl VideoStreamEncoding {
1171    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
1172}
1173impl Default for VideoStreamEncoding {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1207#[cfg_attr(feature = "serde", serde(tag = "type"))]
1208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1209#[repr(u32)]
1210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
1211pub enum AisNavStatus {
1212    #[doc = "Under way using engine."]
1213    UNDER_WAY = 0,
1214    AIS_NAV_ANCHORED = 1,
1215    AIS_NAV_UN_COMMANDED = 2,
1216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
1217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
1218    AIS_NAV_MOORED = 5,
1219    AIS_NAV_AGROUND = 6,
1220    AIS_NAV_FISHING = 7,
1221    AIS_NAV_SAILING = 8,
1222    AIS_NAV_RESERVED_HSC = 9,
1223    AIS_NAV_RESERVED_WIG = 10,
1224    AIS_NAV_RESERVED_1 = 11,
1225    AIS_NAV_RESERVED_2 = 12,
1226    AIS_NAV_RESERVED_3 = 13,
1227    #[doc = "Search And Rescue Transponder."]
1228    AIS_NAV_AIS_SART = 14,
1229    #[doc = "Not available (default)."]
1230    AIS_NAV_UNKNOWN = 15,
1231}
1232impl AisNavStatus {
1233    pub const DEFAULT: Self = Self::UNDER_WAY;
1234}
1235impl Default for AisNavStatus {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
1246pub enum MavDoRepositionFlags {
1247    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
1248    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
1249}
1250impl MavDoRepositionFlags {
1251    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
1252}
1253impl Default for MavDoRepositionFlags {
1254    fn default() -> Self {
1255        Self::DEFAULT
1256    }
1257}
1258bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
1259impl CameraTrackingTargetData {
1260    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
1261}
1262impl Default for CameraTrackingTargetData {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1268impl GpsInputIgnoreFlags {
1269    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1270}
1271impl Default for GpsInputIgnoreFlags {
1272    fn default() -> Self {
1273        Self::DEFAULT
1274    }
1275}
1276#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1278#[cfg_attr(feature = "serde", serde(tag = "type"))]
1279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1280#[repr(u32)]
1281#[doc = "Result from a MAVLink command (MAV_CMD)"]
1282pub enum MavResult {
1283    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
1284    MAV_RESULT_ACCEPTED = 0,
1285    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
1286    MAV_RESULT_TEMPORARILY_REJECTED = 1,
1287    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
1288    MAV_RESULT_DENIED = 2,
1289    #[doc = "Command is not supported (unknown)."]
1290    MAV_RESULT_UNSUPPORTED = 3,
1291    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
1292    MAV_RESULT_FAILED = 4,
1293    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
1294    MAV_RESULT_IN_PROGRESS = 5,
1295    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
1296    MAV_RESULT_CANCELLED = 6,
1297    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
1298    MAV_RESULT_COMMAND_LONG_ONLY = 7,
1299    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
1300    MAV_RESULT_COMMAND_INT_ONLY = 8,
1301    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
1302    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
1303}
1304impl MavResult {
1305    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
1306}
1307impl Default for MavResult {
1308    fn default() -> Self {
1309        Self::DEFAULT
1310    }
1311}
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of the ADSB altimeter types"]
1318pub enum AdsbAltitudeType {
1319    #[doc = "Altitude reported from a Baro source using QNH reference"]
1320    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
1321    #[doc = "Altitude reported from a GNSS source"]
1322    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
1323}
1324impl AdsbAltitudeType {
1325    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
1326}
1327impl Default for AdsbAltitudeType {
1328    fn default() -> Self {
1329        Self::DEFAULT
1330    }
1331}
1332#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1334#[cfg_attr(feature = "serde", serde(tag = "type"))]
1335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1336#[repr(u32)]
1337#[doc = "Enumeration of VTOL states"]
1338pub enum MavVtolState {
1339    #[doc = "MAV is not configured as VTOL"]
1340    MAV_VTOL_STATE_UNDEFINED = 0,
1341    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
1342    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
1343    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
1344    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
1345    #[doc = "VTOL is in multicopter state"]
1346    MAV_VTOL_STATE_MC = 3,
1347    #[doc = "VTOL is in fixed-wing state"]
1348    MAV_VTOL_STATE_FW = 4,
1349}
1350impl MavVtolState {
1351    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
1352}
1353impl Default for MavVtolState {
1354    fn default() -> Self {
1355        Self::DEFAULT
1356    }
1357}
1358bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
1359impl UtmDataAvailFlags {
1360    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
1361}
1362impl Default for UtmDataAvailFlags {
1363    fn default() -> Self {
1364        Self::DEFAULT
1365    }
1366}
1367bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
1368impl GimbalManagerCapFlags {
1369    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
1370}
1371impl Default for GimbalManagerCapFlags {
1372    fn default() -> Self {
1373        Self::DEFAULT
1374    }
1375}
1376bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
1377impl StorageUsageFlag {
1378    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
1379}
1380impl Default for StorageUsageFlag {
1381    fn default() -> Self {
1382        Self::DEFAULT
1383    }
1384}
1385#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1387#[cfg_attr(feature = "serde", serde(tag = "type"))]
1388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1389#[repr(u32)]
1390#[doc = "Flags to indicate the type of storage."]
1391pub enum StorageType {
1392    #[doc = "Storage type is not known."]
1393    STORAGE_TYPE_UNKNOWN = 0,
1394    #[doc = "Storage type is USB device."]
1395    STORAGE_TYPE_USB_STICK = 1,
1396    #[doc = "Storage type is SD card."]
1397    STORAGE_TYPE_SD = 2,
1398    #[doc = "Storage type is microSD card."]
1399    STORAGE_TYPE_MICROSD = 3,
1400    #[doc = "Storage type is CFast."]
1401    STORAGE_TYPE_CF = 4,
1402    #[doc = "Storage type is CFexpress."]
1403    STORAGE_TYPE_CFE = 5,
1404    #[doc = "Storage type is XQD."]
1405    STORAGE_TYPE_XQD = 6,
1406    #[doc = "Storage type is HD mass storage type."]
1407    STORAGE_TYPE_HD = 7,
1408    #[doc = "Storage type is other, not listed type."]
1409    STORAGE_TYPE_OTHER = 254,
1410}
1411impl StorageType {
1412    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
1413}
1414impl Default for StorageType {
1415    fn default() -> Self {
1416        Self::DEFAULT
1417    }
1418}
1419#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1421#[cfg_attr(feature = "serde", serde(tag = "type"))]
1422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1423#[repr(u32)]
1424#[doc = "Aircraft-rated danger from this threat."]
1425pub enum MavCollisionThreatLevel {
1426    #[doc = "Not a threat"]
1427    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1428    #[doc = "Craft is mildly concerned about this threat"]
1429    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1430    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1431    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1432}
1433impl MavCollisionThreatLevel {
1434    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1435}
1436impl Default for MavCollisionThreatLevel {
1437    fn default() -> Self {
1438        Self::DEFAULT
1439    }
1440}
1441#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1443#[cfg_attr(feature = "serde", serde(tag = "type"))]
1444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1445#[repr(u32)]
1446#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
1447pub enum MotorTestOrder {
1448    #[doc = "Default autopilot motor test method."]
1449    MOTOR_TEST_ORDER_DEFAULT = 0,
1450    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
1451    MOTOR_TEST_ORDER_SEQUENCE = 1,
1452    #[doc = "Motor numbers are specified as the output as labeled on the board."]
1453    MOTOR_TEST_ORDER_BOARD = 2,
1454}
1455impl MotorTestOrder {
1456    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
1457}
1458impl Default for MotorTestOrder {
1459    fn default() -> Self {
1460        Self::DEFAULT
1461    }
1462}
1463#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1465#[cfg_attr(feature = "serde", serde(tag = "type"))]
1466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1467#[repr(u32)]
1468#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
1469pub enum ActuatorConfiguration {
1470    #[doc = "Do nothing."]
1471    ACTUATOR_CONFIGURATION_NONE = 0,
1472    #[doc = "Command the actuator to beep now."]
1473    ACTUATOR_CONFIGURATION_BEEP = 1,
1474    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
1475    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
1476    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
1477    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
1478    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
1479    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
1480    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
1481    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
1482}
1483impl ActuatorConfiguration {
1484    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
1485}
1486impl Default for ActuatorConfiguration {
1487    fn default() -> Self {
1488        Self::DEFAULT
1489    }
1490}
1491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1493#[cfg_attr(feature = "serde", serde(tag = "type"))]
1494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1495#[repr(u32)]
1496#[doc = "Enumeration of landed detector states"]
1497pub enum MavLandedState {
1498    #[doc = "MAV landed state is unknown"]
1499    MAV_LANDED_STATE_UNDEFINED = 0,
1500    #[doc = "MAV is landed (on ground)"]
1501    MAV_LANDED_STATE_ON_GROUND = 1,
1502    #[doc = "MAV is in air"]
1503    MAV_LANDED_STATE_IN_AIR = 2,
1504    #[doc = "MAV currently taking off"]
1505    MAV_LANDED_STATE_TAKEOFF = 3,
1506    #[doc = "MAV currently landing"]
1507    MAV_LANDED_STATE_LANDING = 4,
1508}
1509impl MavLandedState {
1510    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
1511}
1512impl Default for MavLandedState {
1513    fn default() -> Self {
1514        Self::DEFAULT
1515    }
1516}
1517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1519#[cfg_attr(feature = "serde", serde(tag = "type"))]
1520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1521#[repr(u32)]
1522pub enum MavOdidCategoryEu {
1523    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
1524    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
1525    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
1526    MAV_ODID_CATEGORY_EU_OPEN = 1,
1527    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
1528    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
1529    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
1530    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
1531}
1532impl MavOdidCategoryEu {
1533    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
1534}
1535impl Default for MavOdidCategoryEu {
1536    fn default() -> Self {
1537        Self::DEFAULT
1538    }
1539}
1540bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
1541impl MavSysStatusSensorExtended {
1542    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
1543}
1544impl Default for MavSysStatusSensorExtended {
1545    fn default() -> Self {
1546        Self::DEFAULT
1547    }
1548}
1549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1551#[cfg_attr(feature = "serde", serde(tag = "type"))]
1552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1553#[repr(u32)]
1554#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1555pub enum MavComponent {
1556    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1557    MAV_COMP_ID_ALL = 0,
1558    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1559    MAV_COMP_ID_AUTOPILOT1 = 1,
1560    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1561    MAV_COMP_ID_USER1 = 25,
1562    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1563    MAV_COMP_ID_USER2 = 26,
1564    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1565    MAV_COMP_ID_USER3 = 27,
1566    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1567    MAV_COMP_ID_USER4 = 28,
1568    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1569    MAV_COMP_ID_USER5 = 29,
1570    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1571    MAV_COMP_ID_USER6 = 30,
1572    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1573    MAV_COMP_ID_USER7 = 31,
1574    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1575    MAV_COMP_ID_USER8 = 32,
1576    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1577    MAV_COMP_ID_USER9 = 33,
1578    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1579    MAV_COMP_ID_USER10 = 34,
1580    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1581    MAV_COMP_ID_USER11 = 35,
1582    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1583    MAV_COMP_ID_USER12 = 36,
1584    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1585    MAV_COMP_ID_USER13 = 37,
1586    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1587    MAV_COMP_ID_USER14 = 38,
1588    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1589    MAV_COMP_ID_USER15 = 39,
1590    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1591    MAV_COMP_ID_USER16 = 40,
1592    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1593    MAV_COMP_ID_USER17 = 41,
1594    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1595    MAV_COMP_ID_USER18 = 42,
1596    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1597    MAV_COMP_ID_USER19 = 43,
1598    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1599    MAV_COMP_ID_USER20 = 44,
1600    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1601    MAV_COMP_ID_USER21 = 45,
1602    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1603    MAV_COMP_ID_USER22 = 46,
1604    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1605    MAV_COMP_ID_USER23 = 47,
1606    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1607    MAV_COMP_ID_USER24 = 48,
1608    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1609    MAV_COMP_ID_USER25 = 49,
1610    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1611    MAV_COMP_ID_USER26 = 50,
1612    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1613    MAV_COMP_ID_USER27 = 51,
1614    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1615    MAV_COMP_ID_USER28 = 52,
1616    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1617    MAV_COMP_ID_USER29 = 53,
1618    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1619    MAV_COMP_ID_USER30 = 54,
1620    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1621    MAV_COMP_ID_USER31 = 55,
1622    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1623    MAV_COMP_ID_USER32 = 56,
1624    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1625    MAV_COMP_ID_USER33 = 57,
1626    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1627    MAV_COMP_ID_USER34 = 58,
1628    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1629    MAV_COMP_ID_USER35 = 59,
1630    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1631    MAV_COMP_ID_USER36 = 60,
1632    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1633    MAV_COMP_ID_USER37 = 61,
1634    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1635    MAV_COMP_ID_USER38 = 62,
1636    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1637    MAV_COMP_ID_USER39 = 63,
1638    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1639    MAV_COMP_ID_USER40 = 64,
1640    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1641    MAV_COMP_ID_USER41 = 65,
1642    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1643    MAV_COMP_ID_USER42 = 66,
1644    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1645    MAV_COMP_ID_USER43 = 67,
1646    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1647    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1648    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1649    MAV_COMP_ID_USER45 = 69,
1650    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1651    MAV_COMP_ID_USER46 = 70,
1652    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1653    MAV_COMP_ID_USER47 = 71,
1654    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1655    MAV_COMP_ID_USER48 = 72,
1656    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1657    MAV_COMP_ID_USER49 = 73,
1658    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1659    MAV_COMP_ID_USER50 = 74,
1660    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1661    MAV_COMP_ID_USER51 = 75,
1662    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1663    MAV_COMP_ID_USER52 = 76,
1664    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1665    MAV_COMP_ID_USER53 = 77,
1666    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1667    MAV_COMP_ID_USER54 = 78,
1668    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1669    MAV_COMP_ID_USER55 = 79,
1670    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1671    MAV_COMP_ID_USER56 = 80,
1672    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1673    MAV_COMP_ID_USER57 = 81,
1674    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1675    MAV_COMP_ID_USER58 = 82,
1676    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1677    MAV_COMP_ID_USER59 = 83,
1678    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1679    MAV_COMP_ID_USER60 = 84,
1680    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1681    MAV_COMP_ID_USER61 = 85,
1682    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1683    MAV_COMP_ID_USER62 = 86,
1684    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1685    MAV_COMP_ID_USER63 = 87,
1686    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1687    MAV_COMP_ID_USER64 = 88,
1688    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1689    MAV_COMP_ID_USER65 = 89,
1690    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1691    MAV_COMP_ID_USER66 = 90,
1692    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1693    MAV_COMP_ID_USER67 = 91,
1694    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1695    MAV_COMP_ID_USER68 = 92,
1696    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1697    MAV_COMP_ID_USER69 = 93,
1698    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1699    MAV_COMP_ID_USER70 = 94,
1700    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1701    MAV_COMP_ID_USER71 = 95,
1702    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1703    MAV_COMP_ID_USER72 = 96,
1704    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1705    MAV_COMP_ID_USER73 = 97,
1706    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1707    MAV_COMP_ID_USER74 = 98,
1708    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1709    MAV_COMP_ID_USER75 = 99,
1710    #[doc = "Camera #1."]
1711    MAV_COMP_ID_CAMERA = 100,
1712    #[doc = "Camera #2."]
1713    MAV_COMP_ID_CAMERA2 = 101,
1714    #[doc = "Camera #3."]
1715    MAV_COMP_ID_CAMERA3 = 102,
1716    #[doc = "Camera #4."]
1717    MAV_COMP_ID_CAMERA4 = 103,
1718    #[doc = "Camera #5."]
1719    MAV_COMP_ID_CAMERA5 = 104,
1720    #[doc = "Camera #6."]
1721    MAV_COMP_ID_CAMERA6 = 105,
1722    #[doc = "Servo #1."]
1723    MAV_COMP_ID_SERVO1 = 140,
1724    #[doc = "Servo #2."]
1725    MAV_COMP_ID_SERVO2 = 141,
1726    #[doc = "Servo #3."]
1727    MAV_COMP_ID_SERVO3 = 142,
1728    #[doc = "Servo #4."]
1729    MAV_COMP_ID_SERVO4 = 143,
1730    #[doc = "Servo #5."]
1731    MAV_COMP_ID_SERVO5 = 144,
1732    #[doc = "Servo #6."]
1733    MAV_COMP_ID_SERVO6 = 145,
1734    #[doc = "Servo #7."]
1735    MAV_COMP_ID_SERVO7 = 146,
1736    #[doc = "Servo #8."]
1737    MAV_COMP_ID_SERVO8 = 147,
1738    #[doc = "Servo #9."]
1739    MAV_COMP_ID_SERVO9 = 148,
1740    #[doc = "Servo #10."]
1741    MAV_COMP_ID_SERVO10 = 149,
1742    #[doc = "Servo #11."]
1743    MAV_COMP_ID_SERVO11 = 150,
1744    #[doc = "Servo #12."]
1745    MAV_COMP_ID_SERVO12 = 151,
1746    #[doc = "Servo #13."]
1747    MAV_COMP_ID_SERVO13 = 152,
1748    #[doc = "Servo #14."]
1749    MAV_COMP_ID_SERVO14 = 153,
1750    #[doc = "Gimbal #1."]
1751    MAV_COMP_ID_GIMBAL = 154,
1752    #[doc = "Logging component."]
1753    MAV_COMP_ID_LOG = 155,
1754    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1755    MAV_COMP_ID_ADSB = 156,
1756    #[doc = "On Screen Display (OSD) devices for video links."]
1757    MAV_COMP_ID_OSD = 157,
1758    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1759    MAV_COMP_ID_PERIPHERAL = 158,
1760    #[doc = "Gimbal ID for QX1."]
1761    MAV_COMP_ID_QX1_GIMBAL = 159,
1762    #[doc = "FLARM collision alert component."]
1763    MAV_COMP_ID_FLARM = 160,
1764    #[doc = "Parachute component."]
1765    MAV_COMP_ID_PARACHUTE = 161,
1766    #[doc = "Winch component."]
1767    MAV_COMP_ID_WINCH = 169,
1768    #[doc = "Gimbal #2."]
1769    MAV_COMP_ID_GIMBAL2 = 171,
1770    #[doc = "Gimbal #3."]
1771    MAV_COMP_ID_GIMBAL3 = 172,
1772    #[doc = "Gimbal #4"]
1773    MAV_COMP_ID_GIMBAL4 = 173,
1774    #[doc = "Gimbal #5."]
1775    MAV_COMP_ID_GIMBAL5 = 174,
1776    #[doc = "Gimbal #6."]
1777    MAV_COMP_ID_GIMBAL6 = 175,
1778    #[doc = "Battery #1."]
1779    MAV_COMP_ID_BATTERY = 180,
1780    #[doc = "Battery #2."]
1781    MAV_COMP_ID_BATTERY2 = 181,
1782    #[doc = "CAN over MAVLink client."]
1783    MAV_COMP_ID_MAVCAN = 189,
1784    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1785    MAV_COMP_ID_MISSIONPLANNER = 190,
1786    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1787    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1788    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1789    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1790    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1791    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1792    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1793    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1794    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1795    MAV_COMP_ID_PATHPLANNER = 195,
1796    #[doc = "Component that plans a collision free path between two points."]
1797    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
1798    #[doc = "Component that provides position estimates using VIO techniques."]
1799    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
1800    #[doc = "Component that manages pairing of vehicle and GCS."]
1801    MAV_COMP_ID_PAIRING_MANAGER = 198,
1802    #[doc = "Inertial Measurement Unit (IMU) #1."]
1803    MAV_COMP_ID_IMU = 200,
1804    #[doc = "Inertial Measurement Unit (IMU) #2."]
1805    MAV_COMP_ID_IMU_2 = 201,
1806    #[doc = "Inertial Measurement Unit (IMU) #3."]
1807    MAV_COMP_ID_IMU_3 = 202,
1808    #[doc = "GPS #1."]
1809    MAV_COMP_ID_GPS = 220,
1810    #[doc = "GPS #2."]
1811    MAV_COMP_ID_GPS2 = 221,
1812    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
1813    MAV_COMP_ID_ODID_TXRX_1 = 236,
1814    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
1815    MAV_COMP_ID_ODID_TXRX_2 = 237,
1816    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
1817    MAV_COMP_ID_ODID_TXRX_3 = 238,
1818    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
1819    MAV_COMP_ID_UDP_BRIDGE = 240,
1820    #[doc = "Component to bridge to UART (i.e. from UDP)."]
1821    MAV_COMP_ID_UART_BRIDGE = 241,
1822    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
1823    MAV_COMP_ID_TUNNEL_NODE = 242,
1824    #[doc = "Illuminator"]
1825    MAV_COMP_ID_ILLUMINATOR = 243,
1826    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
1827    MAV_COMP_ID_SYSTEM_CONTROL = 250,
1828}
1829impl MavComponent {
1830    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
1831}
1832impl Default for MavComponent {
1833    fn default() -> Self {
1834        Self::DEFAULT
1835    }
1836}
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842pub enum FenceBreach {
1843    #[doc = "No last fence breach"]
1844    FENCE_BREACH_NONE = 0,
1845    #[doc = "Breached minimum altitude"]
1846    FENCE_BREACH_MINALT = 1,
1847    #[doc = "Breached maximum altitude"]
1848    FENCE_BREACH_MAXALT = 2,
1849    #[doc = "Breached fence boundary"]
1850    FENCE_BREACH_BOUNDARY = 3,
1851}
1852impl FenceBreach {
1853    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
1854}
1855impl Default for FenceBreach {
1856    fn default() -> Self {
1857        Self::DEFAULT
1858    }
1859}
1860#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1862#[cfg_attr(feature = "serde", serde(tag = "type"))]
1863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1864#[repr(u32)]
1865#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
1866pub enum ActuatorOutputFunction {
1867    #[doc = "No function (disabled)."]
1868    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
1869    #[doc = "Motor 1"]
1870    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
1871    #[doc = "Motor 2"]
1872    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
1873    #[doc = "Motor 3"]
1874    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
1875    #[doc = "Motor 4"]
1876    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
1877    #[doc = "Motor 5"]
1878    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
1879    #[doc = "Motor 6"]
1880    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
1881    #[doc = "Motor 7"]
1882    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
1883    #[doc = "Motor 8"]
1884    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
1885    #[doc = "Motor 9"]
1886    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
1887    #[doc = "Motor 10"]
1888    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
1889    #[doc = "Motor 11"]
1890    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
1891    #[doc = "Motor 12"]
1892    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
1893    #[doc = "Motor 13"]
1894    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
1895    #[doc = "Motor 14"]
1896    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
1897    #[doc = "Motor 15"]
1898    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
1899    #[doc = "Motor 16"]
1900    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
1901    #[doc = "Servo 1"]
1902    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
1903    #[doc = "Servo 2"]
1904    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
1905    #[doc = "Servo 3"]
1906    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
1907    #[doc = "Servo 4"]
1908    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
1909    #[doc = "Servo 5"]
1910    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
1911    #[doc = "Servo 6"]
1912    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
1913    #[doc = "Servo 7"]
1914    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
1915    #[doc = "Servo 8"]
1916    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
1917    #[doc = "Servo 9"]
1918    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
1919    #[doc = "Servo 10"]
1920    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
1921    #[doc = "Servo 11"]
1922    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
1923    #[doc = "Servo 12"]
1924    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
1925    #[doc = "Servo 13"]
1926    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
1927    #[doc = "Servo 14"]
1928    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
1929    #[doc = "Servo 15"]
1930    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
1931    #[doc = "Servo 16"]
1932    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
1933}
1934impl ActuatorOutputFunction {
1935    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
1936}
1937impl Default for ActuatorOutputFunction {
1938    fn default() -> Self {
1939        Self::DEFAULT
1940    }
1941}
1942#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1944#[cfg_attr(feature = "serde", serde(tag = "type"))]
1945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1946#[repr(u32)]
1947pub enum MavOdidUaType {
1948    #[doc = "No UA (Unmanned Aircraft) type defined."]
1949    MAV_ODID_UA_TYPE_NONE = 0,
1950    #[doc = "Aeroplane/Airplane. Fixed wing."]
1951    MAV_ODID_UA_TYPE_AEROPLANE = 1,
1952    #[doc = "Helicopter or multirotor."]
1953    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
1954    #[doc = "Gyroplane."]
1955    MAV_ODID_UA_TYPE_GYROPLANE = 3,
1956    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
1957    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
1958    #[doc = "Ornithopter."]
1959    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
1960    #[doc = "Glider."]
1961    MAV_ODID_UA_TYPE_GLIDER = 6,
1962    #[doc = "Kite."]
1963    MAV_ODID_UA_TYPE_KITE = 7,
1964    #[doc = "Free Balloon."]
1965    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
1966    #[doc = "Captive Balloon."]
1967    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
1968    #[doc = "Airship. E.g. a blimp."]
1969    MAV_ODID_UA_TYPE_AIRSHIP = 10,
1970    #[doc = "Free Fall/Parachute (unpowered)."]
1971    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
1972    #[doc = "Rocket."]
1973    MAV_ODID_UA_TYPE_ROCKET = 12,
1974    #[doc = "Tethered powered aircraft."]
1975    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
1976    #[doc = "Ground Obstacle."]
1977    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
1978    #[doc = "Other type of aircraft not listed earlier."]
1979    MAV_ODID_UA_TYPE_OTHER = 15,
1980}
1981impl MavOdidUaType {
1982    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
1983}
1984impl Default for MavOdidUaType {
1985    fn default() -> Self {
1986        Self::DEFAULT
1987    }
1988}
1989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1991#[cfg_attr(feature = "serde", serde(tag = "type"))]
1992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1993#[repr(u32)]
1994#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
1995pub enum SpeedType {
1996    #[doc = "Airspeed"]
1997    SPEED_TYPE_AIRSPEED = 0,
1998    #[doc = "Groundspeed"]
1999    SPEED_TYPE_GROUNDSPEED = 1,
2000    #[doc = "Climb speed"]
2001    SPEED_TYPE_CLIMB_SPEED = 2,
2002    #[doc = "Descent speed"]
2003    SPEED_TYPE_DESCENT_SPEED = 3,
2004}
2005impl SpeedType {
2006    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
2007}
2008impl Default for SpeedType {
2009    fn default() -> Self {
2010        Self::DEFAULT
2011    }
2012}
2013#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2015#[cfg_attr(feature = "serde", serde(tag = "type"))]
2016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2017#[repr(u32)]
2018#[doc = "Video stream types"]
2019pub enum VideoStreamType {
2020    #[doc = "Stream is RTSP"]
2021    VIDEO_STREAM_TYPE_RTSP = 0,
2022    #[doc = "Stream is RTP UDP (URI gives the port number)"]
2023    VIDEO_STREAM_TYPE_RTPUDP = 1,
2024    #[doc = "Stream is MPEG on TCP"]
2025    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
2026    #[doc = "Stream is MPEG TS (URI gives the port number)"]
2027    VIDEO_STREAM_TYPE_MPEG_TS = 3,
2028}
2029impl VideoStreamType {
2030    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
2031}
2032impl Default for VideoStreamType {
2033    fn default() -> Self {
2034        Self::DEFAULT
2035    }
2036}
2037bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
2038impl SerialControlFlag {
2039    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
2040}
2041impl Default for SerialControlFlag {
2042    fn default() -> Self {
2043        Self::DEFAULT
2044    }
2045}
2046#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2048#[cfg_attr(feature = "serde", serde(tag = "type"))]
2049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2050#[repr(u32)]
2051pub enum CanFilterOp {
2052    CAN_FILTER_REPLACE = 0,
2053    CAN_FILTER_ADD = 1,
2054    CAN_FILTER_REMOVE = 2,
2055}
2056impl CanFilterOp {
2057    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
2058}
2059impl Default for CanFilterOp {
2060    fn default() -> Self {
2061        Self::DEFAULT
2062    }
2063}
2064#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2066#[cfg_attr(feature = "serde", serde(tag = "type"))]
2067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2068#[repr(u32)]
2069pub enum MavOdidVerAcc {
2070    #[doc = "The vertical accuracy is unknown."]
2071    MAV_ODID_VER_ACC_UNKNOWN = 0,
2072    #[doc = "The vertical accuracy is smaller than 150 meter."]
2073    MAV_ODID_VER_ACC_150_METER = 1,
2074    #[doc = "The vertical accuracy is smaller than 45 meter."]
2075    MAV_ODID_VER_ACC_45_METER = 2,
2076    #[doc = "The vertical accuracy is smaller than 25 meter."]
2077    MAV_ODID_VER_ACC_25_METER = 3,
2078    #[doc = "The vertical accuracy is smaller than 10 meter."]
2079    MAV_ODID_VER_ACC_10_METER = 4,
2080    #[doc = "The vertical accuracy is smaller than 3 meter."]
2081    MAV_ODID_VER_ACC_3_METER = 5,
2082    #[doc = "The vertical accuracy is smaller than 1 meter."]
2083    MAV_ODID_VER_ACC_1_METER = 6,
2084}
2085impl MavOdidVerAcc {
2086    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
2087}
2088impl Default for MavOdidVerAcc {
2089    fn default() -> Self {
2090        Self::DEFAULT
2091    }
2092}
2093#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2095#[cfg_attr(feature = "serde", serde(tag = "type"))]
2096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2097#[repr(u32)]
2098#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
2099pub enum MotorTestThrottleType {
2100    #[doc = "Throttle as a percentage (0 ~ 100)"]
2101    MOTOR_TEST_THROTTLE_PERCENT = 0,
2102    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
2103    MOTOR_TEST_THROTTLE_PWM = 1,
2104    #[doc = "Throttle pass-through from pilot's transmitter."]
2105    MOTOR_TEST_THROTTLE_PILOT = 2,
2106    #[doc = "Per-motor compass calibration test."]
2107    MOTOR_TEST_COMPASS_CAL = 3,
2108}
2109impl MotorTestThrottleType {
2110    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
2111}
2112impl Default for MotorTestThrottleType {
2113    fn default() -> Self {
2114        Self::DEFAULT
2115    }
2116}
2117#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2119#[cfg_attr(feature = "serde", serde(tag = "type"))]
2120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2121#[repr(u32)]
2122#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
2123pub enum MavCmd {
2124    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
2125    MAV_CMD_NAV_WAYPOINT = 16,
2126    #[doc = "Loiter around this waypoint an unlimited amount of time"]
2127    MAV_CMD_NAV_LOITER_UNLIM = 17,
2128    #[doc = "Loiter around this waypoint for X turns"]
2129    MAV_CMD_NAV_LOITER_TURNS = 18,
2130    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
2131    MAV_CMD_NAV_LOITER_TIME = 19,
2132    #[doc = "Return to launch location"]
2133    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
2134    #[doc = "Land at location."]
2135    MAV_CMD_NAV_LAND = 21,
2136    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
2137    MAV_CMD_NAV_TAKEOFF = 22,
2138    #[doc = "Land at local position (local frame only)"]
2139    MAV_CMD_NAV_LAND_LOCAL = 23,
2140    #[doc = "Takeoff from local position (local frame only)"]
2141    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
2142    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
2143    MAV_CMD_NAV_FOLLOW = 25,
2144    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
2145    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
2146    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
2147    MAV_CMD_NAV_LOITER_TO_ALT = 31,
2148    #[doc = "Begin following a target"]
2149    MAV_CMD_DO_FOLLOW = 32,
2150    #[doc = "Reposition the MAV after a follow target command has been sent"]
2151    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
2152    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
2153    MAV_CMD_DO_ORBIT = 34,
2154    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2155    MAV_CMD_NAV_ROI = 80,
2156    #[doc = "Control autonomous path planning on the MAV."]
2157    MAV_CMD_NAV_PATHPLANNING = 81,
2158    #[doc = "Navigate to waypoint using a spline path."]
2159    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
2160    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
2161    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
2162    #[doc = "Land using VTOL mode"]
2163    MAV_CMD_NAV_VTOL_LAND = 85,
2164    #[doc = "hand control over to an external controller"]
2165    MAV_CMD_NAV_GUIDED_ENABLE = 92,
2166    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
2167    MAV_CMD_NAV_DELAY = 93,
2168    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
2169    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
2170    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
2171    MAV_CMD_NAV_LAST = 95,
2172    #[doc = "Delay mission state machine."]
2173    MAV_CMD_CONDITION_DELAY = 112,
2174    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
2175    MAV_CMD_CONDITION_CHANGE_ALT = 113,
2176    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
2177    MAV_CMD_CONDITION_DISTANCE = 114,
2178    #[doc = "Reach a certain target angle."]
2179    MAV_CMD_CONDITION_YAW = 115,
2180    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
2181    MAV_CMD_CONDITION_LAST = 159,
2182    #[doc = "Set system mode."]
2183    MAV_CMD_DO_SET_MODE = 176,
2184    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
2185    MAV_CMD_DO_JUMP = 177,
2186    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
2187    MAV_CMD_DO_CHANGE_SPEED = 178,
2188    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
2189    MAV_CMD_DO_SET_HOME = 179,
2190    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
2191    MAV_CMD_DO_SET_PARAMETER = 180,
2192    #[doc = "Set a relay to a condition."]
2193    MAV_CMD_DO_SET_RELAY = 181,
2194    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
2195    MAV_CMD_DO_REPEAT_RELAY = 182,
2196    #[doc = "Set a servo to a desired PWM value."]
2197    MAV_CMD_DO_SET_SERVO = 183,
2198    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
2199    MAV_CMD_DO_REPEAT_SERVO = 184,
2200    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
2201    MAV_CMD_DO_FLIGHTTERMINATION = 185,
2202    #[doc = "Change altitude set point."]
2203    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
2204    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
2205    MAV_CMD_DO_SET_ACTUATOR = 187,
2206    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
2207    MAV_CMD_DO_RETURN_PATH_START = 188,
2208    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
2209    MAV_CMD_DO_LAND_START = 189,
2210    #[doc = "Mission command to perform a landing from a rally point."]
2211    MAV_CMD_DO_RALLY_LAND = 190,
2212    #[doc = "Mission command to safely abort an autonomous landing."]
2213    MAV_CMD_DO_GO_AROUND = 191,
2214    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2215    MAV_CMD_DO_REPOSITION = 192,
2216    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2217    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2218    #[doc = "Set moving direction to forward or reverse."]
2219    MAV_CMD_DO_SET_REVERSE = 194,
2220    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2221    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2222    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2223    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2224    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2225    MAV_CMD_DO_SET_ROI_NONE = 197,
2226    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2227    MAV_CMD_DO_SET_ROI_SYSID = 198,
2228    #[doc = "Control onboard camera system."]
2229    MAV_CMD_DO_CONTROL_VIDEO = 200,
2230    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2231    MAV_CMD_DO_SET_ROI = 201,
2232    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2233    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2234    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2235    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2236    #[doc = "Mission command to configure a camera or antenna mount"]
2237    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2238    #[doc = "Mission command to control a camera or antenna mount"]
2239    MAV_CMD_DO_MOUNT_CONTROL = 205,
2240    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2241    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2242    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2243    MAV_CMD_DO_FENCE_ENABLE = 207,
2244    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2245    MAV_CMD_DO_PARACHUTE = 208,
2246    #[doc = "Command to perform motor test."]
2247    MAV_CMD_DO_MOTOR_TEST = 209,
2248    #[doc = "Change to/from inverted flight."]
2249    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2250    #[doc = "Mission command to operate a gripper."]
2251    MAV_CMD_DO_GRIPPER = 211,
2252    #[doc = "Enable/disable autotune."]
2253    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2254    #[doc = "Sets a desired vehicle turn angle and speed change."]
2255    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2256    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2257    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2258    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2259    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2260    #[doc = "set id of master controller"]
2261    MAV_CMD_DO_GUIDED_MASTER = 221,
2262    #[doc = "Set limits for external control"]
2263    MAV_CMD_DO_GUIDED_LIMITS = 222,
2264    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2265    MAV_CMD_DO_ENGINE_CONTROL = 223,
2266    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2267    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2268    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2269    MAV_CMD_DO_LAST = 240,
2270    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2271    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2272    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2273    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2274    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2275    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2276    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2277    MAV_CMD_PREFLIGHT_STORAGE = 245,
2278    #[doc = "Request the reboot or shutdown of system components."]
2279    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2280    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2281    MAV_CMD_OVERRIDE_GOTO = 252,
2282    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2283    MAV_CMD_OBLIQUE_SURVEY = 260,
2284    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2285    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2286    #[doc = "start running a mission"]
2287    MAV_CMD_MISSION_START = 300,
2288    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2289    MAV_CMD_ACTUATOR_TEST = 310,
2290    #[doc = "Actuator configuration command."]
2291    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2292    #[doc = "Arms / Disarms a component"]
2293    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2294    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2295    MAV_CMD_RUN_PREARM_CHECKS = 401,
2296    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2297    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2298    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2299    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2300    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2301    MAV_CMD_GET_HOME_POSITION = 410,
2302    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2303    MAV_CMD_INJECT_FAILURE = 420,
2304    #[doc = "Starts receiver pairing."]
2305    MAV_CMD_START_RX_PAIR = 500,
2306    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2307    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2308    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2309    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2310    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2311    MAV_CMD_REQUEST_MESSAGE = 512,
2312    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2313    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2314    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2315    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2316    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2317    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2318    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2319    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2320    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2321    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2322    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2323    MAV_CMD_STORAGE_FORMAT = 526,
2324    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2325    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2326    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2327    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2328    #[doc = "Reset all camera settings to Factory Default"]
2329    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2330    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2331    MAV_CMD_SET_CAMERA_MODE = 530,
2332    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2333    MAV_CMD_SET_CAMERA_ZOOM = 531,
2334    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2335    MAV_CMD_SET_CAMERA_FOCUS = 532,
2336    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2337    MAV_CMD_SET_STORAGE_USAGE = 533,
2338    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2339    MAV_CMD_SET_CAMERA_SOURCE = 534,
2340    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2341    MAV_CMD_JUMP_TAG = 600,
2342    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2343    MAV_CMD_DO_JUMP_TAG = 601,
2344    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2345    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2346    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2347    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2348    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2349    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2350    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2351    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2352    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2353    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2354    #[doc = "Enable or disable on-board camera triggering system."]
2355    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2356    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2357    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2358    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2359    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2360    #[doc = "Stops ongoing tracking."]
2361    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2362    #[doc = "Starts video capture (recording)."]
2363    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2364    #[doc = "Stop the current video capture (recording)."]
2365    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2366    #[doc = "Start video streaming"]
2367    MAV_CMD_VIDEO_START_STREAMING = 2502,
2368    #[doc = "Stop the given video stream"]
2369    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2370    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2371    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
2372    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
2373    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
2374    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
2375    MAV_CMD_LOGGING_START = 2510,
2376    #[doc = "Request to stop streaming log data over MAVLink"]
2377    MAV_CMD_LOGGING_STOP = 2511,
2378    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
2379    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
2380    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
2381    #[doc = "Create a panorama at the current position"]
2382    MAV_CMD_PANORAMA_CREATE = 2800,
2383    #[doc = "Request VTOL transition"]
2384    MAV_CMD_DO_VTOL_TRANSITION = 3000,
2385    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
2386    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
2387    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
2388    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
2389    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
2390    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
2391    #[doc = "Delay mission state machine until gate has been reached."]
2392    MAV_CMD_CONDITION_GATE = 4501,
2393    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
2394    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
2395    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2396    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
2397    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2398    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
2399    #[doc = "Circular fence area. The vehicle must stay inside this area."]
2400    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
2401    #[doc = "Circular fence area. The vehicle must stay outside this area."]
2402    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
2403    #[doc = "Rally point. You can have multiple rally points defined."]
2404    MAV_CMD_NAV_RALLY_POINT = 5100,
2405    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
2406    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
2407    #[doc = "Change state of safety switch."]
2408    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
2409    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
2410    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
2411    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
2412    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
2413    #[doc = "Control the payload deployment."]
2414    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
2415    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
2416    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
2417    #[doc = "Command to operate winch."]
2418    MAV_CMD_DO_WINCH = 42600,
2419    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
2420    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
2421    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2422    MAV_CMD_WAYPOINT_USER_1 = 31000,
2423    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2424    MAV_CMD_WAYPOINT_USER_2 = 31001,
2425    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2426    MAV_CMD_WAYPOINT_USER_3 = 31002,
2427    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2428    MAV_CMD_WAYPOINT_USER_4 = 31003,
2429    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2430    MAV_CMD_WAYPOINT_USER_5 = 31004,
2431    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2432    MAV_CMD_SPATIAL_USER_1 = 31005,
2433    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2434    MAV_CMD_SPATIAL_USER_2 = 31006,
2435    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2436    MAV_CMD_SPATIAL_USER_3 = 31007,
2437    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2438    MAV_CMD_SPATIAL_USER_4 = 31008,
2439    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2440    MAV_CMD_SPATIAL_USER_5 = 31009,
2441    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2442    MAV_CMD_USER_1 = 31010,
2443    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2444    MAV_CMD_USER_2 = 31011,
2445    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2446    MAV_CMD_USER_3 = 31012,
2447    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2448    MAV_CMD_USER_4 = 31013,
2449    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2450    MAV_CMD_USER_5 = 31014,
2451    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
2452    MAV_CMD_CAN_FORWARD = 32000,
2453    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
2454    MAV_CMD_RESET_MPPT = 40001,
2455    #[doc = "Mission command to perform a power cycle on payload"]
2456    MAV_CMD_PAYLOAD_CONTROL = 40002,
2457}
2458impl MavCmd {
2459    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
2460}
2461impl Default for MavCmd {
2462    fn default() -> Self {
2463        Self::DEFAULT
2464    }
2465}
2466bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
2467impl AisFlags {
2468    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
2469}
2470impl Default for AisFlags {
2471    fn default() -> Self {
2472        Self::DEFAULT
2473    }
2474}
2475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2477#[cfg_attr(feature = "serde", serde(tag = "type"))]
2478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2479#[repr(u32)]
2480#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
2481pub enum AisType {
2482    #[doc = "Not available (default)."]
2483    AIS_TYPE_UNKNOWN = 0,
2484    AIS_TYPE_RESERVED_1 = 1,
2485    AIS_TYPE_RESERVED_2 = 2,
2486    AIS_TYPE_RESERVED_3 = 3,
2487    AIS_TYPE_RESERVED_4 = 4,
2488    AIS_TYPE_RESERVED_5 = 5,
2489    AIS_TYPE_RESERVED_6 = 6,
2490    AIS_TYPE_RESERVED_7 = 7,
2491    AIS_TYPE_RESERVED_8 = 8,
2492    AIS_TYPE_RESERVED_9 = 9,
2493    AIS_TYPE_RESERVED_10 = 10,
2494    AIS_TYPE_RESERVED_11 = 11,
2495    AIS_TYPE_RESERVED_12 = 12,
2496    AIS_TYPE_RESERVED_13 = 13,
2497    AIS_TYPE_RESERVED_14 = 14,
2498    AIS_TYPE_RESERVED_15 = 15,
2499    AIS_TYPE_RESERVED_16 = 16,
2500    AIS_TYPE_RESERVED_17 = 17,
2501    AIS_TYPE_RESERVED_18 = 18,
2502    AIS_TYPE_RESERVED_19 = 19,
2503    #[doc = "Wing In Ground effect."]
2504    AIS_TYPE_WIG = 20,
2505    AIS_TYPE_WIG_HAZARDOUS_A = 21,
2506    AIS_TYPE_WIG_HAZARDOUS_B = 22,
2507    AIS_TYPE_WIG_HAZARDOUS_C = 23,
2508    AIS_TYPE_WIG_HAZARDOUS_D = 24,
2509    AIS_TYPE_WIG_RESERVED_1 = 25,
2510    AIS_TYPE_WIG_RESERVED_2 = 26,
2511    AIS_TYPE_WIG_RESERVED_3 = 27,
2512    AIS_TYPE_WIG_RESERVED_4 = 28,
2513    AIS_TYPE_WIG_RESERVED_5 = 29,
2514    AIS_TYPE_FISHING = 30,
2515    AIS_TYPE_TOWING = 31,
2516    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
2517    AIS_TYPE_TOWING_LARGE = 32,
2518    #[doc = "Dredging or other underwater ops."]
2519    AIS_TYPE_DREDGING = 33,
2520    AIS_TYPE_DIVING = 34,
2521    AIS_TYPE_MILITARY = 35,
2522    AIS_TYPE_SAILING = 36,
2523    AIS_TYPE_PLEASURE = 37,
2524    AIS_TYPE_RESERVED_20 = 38,
2525    AIS_TYPE_RESERVED_21 = 39,
2526    #[doc = "High Speed Craft."]
2527    AIS_TYPE_HSC = 40,
2528    AIS_TYPE_HSC_HAZARDOUS_A = 41,
2529    AIS_TYPE_HSC_HAZARDOUS_B = 42,
2530    AIS_TYPE_HSC_HAZARDOUS_C = 43,
2531    AIS_TYPE_HSC_HAZARDOUS_D = 44,
2532    AIS_TYPE_HSC_RESERVED_1 = 45,
2533    AIS_TYPE_HSC_RESERVED_2 = 46,
2534    AIS_TYPE_HSC_RESERVED_3 = 47,
2535    AIS_TYPE_HSC_RESERVED_4 = 48,
2536    AIS_TYPE_HSC_UNKNOWN = 49,
2537    AIS_TYPE_PILOT = 50,
2538    #[doc = "Search And Rescue vessel."]
2539    AIS_TYPE_SAR = 51,
2540    AIS_TYPE_TUG = 52,
2541    AIS_TYPE_PORT_TENDER = 53,
2542    #[doc = "Anti-pollution equipment."]
2543    AIS_TYPE_ANTI_POLLUTION = 54,
2544    AIS_TYPE_LAW_ENFORCEMENT = 55,
2545    AIS_TYPE_SPARE_LOCAL_1 = 56,
2546    AIS_TYPE_SPARE_LOCAL_2 = 57,
2547    AIS_TYPE_MEDICAL_TRANSPORT = 58,
2548    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
2549    AIS_TYPE_NONECOMBATANT = 59,
2550    AIS_TYPE_PASSENGER = 60,
2551    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
2552    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
2553    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
2554    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
2555    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
2556    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
2557    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
2558    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
2559    AIS_TYPE_PASSENGER_UNKNOWN = 69,
2560    AIS_TYPE_CARGO = 70,
2561    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
2562    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
2563    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
2564    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
2565    AIS_TYPE_CARGO_RESERVED_1 = 75,
2566    AIS_TYPE_CARGO_RESERVED_2 = 76,
2567    AIS_TYPE_CARGO_RESERVED_3 = 77,
2568    AIS_TYPE_CARGO_RESERVED_4 = 78,
2569    AIS_TYPE_CARGO_UNKNOWN = 79,
2570    AIS_TYPE_TANKER = 80,
2571    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
2572    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
2573    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
2574    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
2575    AIS_TYPE_TANKER_RESERVED_1 = 85,
2576    AIS_TYPE_TANKER_RESERVED_2 = 86,
2577    AIS_TYPE_TANKER_RESERVED_3 = 87,
2578    AIS_TYPE_TANKER_RESERVED_4 = 88,
2579    AIS_TYPE_TANKER_UNKNOWN = 89,
2580    AIS_TYPE_OTHER = 90,
2581    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
2582    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
2583    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
2584    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
2585    AIS_TYPE_OTHER_RESERVED_1 = 95,
2586    AIS_TYPE_OTHER_RESERVED_2 = 96,
2587    AIS_TYPE_OTHER_RESERVED_3 = 97,
2588    AIS_TYPE_OTHER_RESERVED_4 = 98,
2589    AIS_TYPE_OTHER_UNKNOWN = 99,
2590}
2591impl AisType {
2592    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
2593}
2594impl Default for AisType {
2595    fn default() -> Self {
2596        Self::DEFAULT
2597    }
2598}
2599bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
2600impl GimbalDeviceErrorFlags {
2601    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
2602}
2603impl Default for GimbalDeviceErrorFlags {
2604    fn default() -> Self {
2605        Self::DEFAULT
2606    }
2607}
2608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2610#[cfg_attr(feature = "serde", serde(tag = "type"))]
2611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2612#[repr(u32)]
2613#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2614pub enum MavMode {
2615    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2616    MAV_MODE_PREFLIGHT = 0,
2617    #[doc = "System is allowed to be active, under assisted RC control."]
2618    MAV_MODE_STABILIZE_DISARMED = 80,
2619    #[doc = "System is allowed to be active, under assisted RC control."]
2620    MAV_MODE_STABILIZE_ARMED = 208,
2621    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2622    MAV_MODE_MANUAL_DISARMED = 64,
2623    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2624    MAV_MODE_MANUAL_ARMED = 192,
2625    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2626    MAV_MODE_GUIDED_DISARMED = 88,
2627    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2628    MAV_MODE_GUIDED_ARMED = 216,
2629    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2630    MAV_MODE_AUTO_DISARMED = 92,
2631    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2632    MAV_MODE_AUTO_ARMED = 220,
2633    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2634    MAV_MODE_TEST_DISARMED = 66,
2635    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2636    MAV_MODE_TEST_ARMED = 194,
2637}
2638impl MavMode {
2639    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2640}
2641impl Default for MavMode {
2642    fn default() -> Self {
2643        Self::DEFAULT
2644    }
2645}
2646#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2648#[cfg_attr(feature = "serde", serde(tag = "type"))]
2649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2650#[repr(u32)]
2651#[doc = "Possible actions an aircraft can take to avoid a collision."]
2652pub enum MavCollisionAction {
2653    #[doc = "Ignore any potential collisions"]
2654    MAV_COLLISION_ACTION_NONE = 0,
2655    #[doc = "Report potential collision"]
2656    MAV_COLLISION_ACTION_REPORT = 1,
2657    #[doc = "Ascend or Descend to avoid threat"]
2658    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
2659    #[doc = "Move horizontally to avoid threat"]
2660    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
2661    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
2662    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
2663    #[doc = "Aircraft to fly directly back to its launch point"]
2664    MAV_COLLISION_ACTION_RTL = 5,
2665    #[doc = "Aircraft to stop in place"]
2666    MAV_COLLISION_ACTION_HOVER = 6,
2667}
2668impl MavCollisionAction {
2669    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
2670}
2671impl Default for MavCollisionAction {
2672    fn default() -> Self {
2673        Self::DEFAULT
2674    }
2675}
2676#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2678#[cfg_attr(feature = "serde", serde(tag = "type"))]
2679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2680#[repr(u32)]
2681#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
2682pub enum PreflightStorageMissionAction {
2683    #[doc = "Read current mission data from persistent storage"]
2684    MISSION_READ_PERSISTENT = 0,
2685    #[doc = "Write current mission data to persistent storage"]
2686    MISSION_WRITE_PERSISTENT = 1,
2687    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
2688    MISSION_RESET_DEFAULT = 2,
2689}
2690impl PreflightStorageMissionAction {
2691    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
2692}
2693impl Default for PreflightStorageMissionAction {
2694    fn default() -> Self {
2695        Self::DEFAULT
2696    }
2697}
2698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2700#[cfg_attr(feature = "serde", serde(tag = "type"))]
2701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2702#[repr(u32)]
2703#[doc = "Camera Modes."]
2704pub enum CameraMode {
2705    #[doc = "Camera is in image/photo capture mode."]
2706    CAMERA_MODE_IMAGE = 0,
2707    #[doc = "Camera is in video capture mode."]
2708    CAMERA_MODE_VIDEO = 1,
2709    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
2710    CAMERA_MODE_IMAGE_SURVEY = 2,
2711}
2712impl CameraMode {
2713    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
2714}
2715impl Default for CameraMode {
2716    fn default() -> Self {
2717        Self::DEFAULT
2718    }
2719}
2720#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2722#[cfg_attr(feature = "serde", serde(tag = "type"))]
2723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2724#[repr(u32)]
2725#[doc = "Enumeration of battery types"]
2726pub enum MavBatteryType {
2727    #[doc = "Not specified."]
2728    MAV_BATTERY_TYPE_UNKNOWN = 0,
2729    #[doc = "Lithium polymer battery"]
2730    MAV_BATTERY_TYPE_LIPO = 1,
2731    #[doc = "Lithium-iron-phosphate battery"]
2732    MAV_BATTERY_TYPE_LIFE = 2,
2733    #[doc = "Lithium-ION battery"]
2734    MAV_BATTERY_TYPE_LION = 3,
2735    #[doc = "Nickel metal hydride battery"]
2736    MAV_BATTERY_TYPE_NIMH = 4,
2737}
2738impl MavBatteryType {
2739    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
2740}
2741impl Default for MavBatteryType {
2742    fn default() -> Self {
2743        Self::DEFAULT
2744    }
2745}
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751#[doc = "Generalized UAVCAN node health"]
2752pub enum UavcanNodeHealth {
2753    #[doc = "The node is functioning properly."]
2754    UAVCAN_NODE_HEALTH_OK = 0,
2755    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
2756    UAVCAN_NODE_HEALTH_WARNING = 1,
2757    #[doc = "The node has encountered a major failure."]
2758    UAVCAN_NODE_HEALTH_ERROR = 2,
2759    #[doc = "The node has suffered a fatal malfunction."]
2760    UAVCAN_NODE_HEALTH_CRITICAL = 3,
2761}
2762impl UavcanNodeHealth {
2763    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
2764}
2765impl Default for UavcanNodeHealth {
2766    fn default() -> Self {
2767        Self::DEFAULT
2768    }
2769}
2770#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2772#[cfg_attr(feature = "serde", serde(tag = "type"))]
2773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2774#[repr(u32)]
2775#[doc = "Gripper actions."]
2776pub enum GripperActions {
2777    #[doc = "Gripper release cargo."]
2778    GRIPPER_ACTION_RELEASE = 0,
2779    #[doc = "Gripper grab onto cargo."]
2780    GRIPPER_ACTION_GRAB = 1,
2781}
2782impl GripperActions {
2783    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
2784}
2785impl Default for GripperActions {
2786    fn default() -> Self {
2787        Self::DEFAULT
2788    }
2789}
2790#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2792#[cfg_attr(feature = "serde", serde(tag = "type"))]
2793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2794#[repr(u32)]
2795#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2796pub enum MavMissionResult {
2797    #[doc = "mission accepted OK"]
2798    MAV_MISSION_ACCEPTED = 0,
2799    #[doc = "Generic error / not accepting mission commands at all right now."]
2800    MAV_MISSION_ERROR = 1,
2801    #[doc = "Coordinate frame is not supported."]
2802    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2803    #[doc = "Command is not supported."]
2804    MAV_MISSION_UNSUPPORTED = 3,
2805    #[doc = "Mission items exceed storage space."]
2806    MAV_MISSION_NO_SPACE = 4,
2807    #[doc = "One of the parameters has an invalid value."]
2808    MAV_MISSION_INVALID = 5,
2809    #[doc = "param1 has an invalid value."]
2810    MAV_MISSION_INVALID_PARAM1 = 6,
2811    #[doc = "param2 has an invalid value."]
2812    MAV_MISSION_INVALID_PARAM2 = 7,
2813    #[doc = "param3 has an invalid value."]
2814    MAV_MISSION_INVALID_PARAM3 = 8,
2815    #[doc = "param4 has an invalid value."]
2816    MAV_MISSION_INVALID_PARAM4 = 9,
2817    #[doc = "x / param5 has an invalid value."]
2818    MAV_MISSION_INVALID_PARAM5_X = 10,
2819    #[doc = "y / param6 has an invalid value."]
2820    MAV_MISSION_INVALID_PARAM6_Y = 11,
2821    #[doc = "z / param7 has an invalid value."]
2822    MAV_MISSION_INVALID_PARAM7 = 12,
2823    #[doc = "Mission item received out of sequence"]
2824    MAV_MISSION_INVALID_SEQUENCE = 13,
2825    #[doc = "Not accepting any mission commands from this communication partner."]
2826    MAV_MISSION_DENIED = 14,
2827    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2828    MAV_MISSION_OPERATION_CANCELLED = 15,
2829}
2830impl MavMissionResult {
2831    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2832}
2833impl Default for MavMissionResult {
2834    fn default() -> Self {
2835        Self::DEFAULT
2836    }
2837}
2838bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2839impl MavModeFlag {
2840    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2841}
2842impl Default for MavModeFlag {
2843    fn default() -> Self {
2844        Self::DEFAULT
2845    }
2846}
2847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2849#[cfg_attr(feature = "serde", serde(tag = "type"))]
2850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2851#[repr(u32)]
2852pub enum MavOdidOperatorIdType {
2853    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2854    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2855}
2856impl MavOdidOperatorIdType {
2857    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2858}
2859impl Default for MavOdidOperatorIdType {
2860    fn default() -> Self {
2861        Self::DEFAULT
2862    }
2863}
2864bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
2865impl GimbalDeviceCapFlags {
2866    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
2867}
2868impl Default for GimbalDeviceCapFlags {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidSpeedAcc {
2879    #[doc = "The speed accuracy is unknown."]
2880    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2881    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2882    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2883    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2884    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2885    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2886    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2887    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2888    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2889}
2890impl MavOdidSpeedAcc {
2891    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2892}
2893impl Default for MavOdidSpeedAcc {
2894    fn default() -> Self {
2895        Self::DEFAULT
2896    }
2897}
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
2904pub enum PreflightStorageParameterAction {
2905    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
2906    PARAM_READ_PERSISTENT = 0,
2907    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
2908    PARAM_WRITE_PERSISTENT = 1,
2909    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
2910    PARAM_RESET_CONFIG_DEFAULT = 2,
2911    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
2912    PARAM_RESET_SENSOR_DEFAULT = 3,
2913    #[doc = "Reset all parameters, including operation counters, to default values"]
2914    PARAM_RESET_ALL_DEFAULT = 4,
2915}
2916impl PreflightStorageParameterAction {
2917    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
2918}
2919impl Default for PreflightStorageParameterAction {
2920    fn default() -> Self {
2921        Self::DEFAULT
2922    }
2923}
2924#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2926#[cfg_attr(feature = "serde", serde(tag = "type"))]
2927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2928#[repr(u32)]
2929pub enum MavState {
2930    #[doc = "Uninitialized system, state is unknown."]
2931    MAV_STATE_UNINIT = 0,
2932    #[doc = "System is booting up."]
2933    MAV_STATE_BOOT = 1,
2934    #[doc = "System is calibrating and not flight-ready."]
2935    MAV_STATE_CALIBRATING = 2,
2936    #[doc = "System is grounded and on standby. It can be launched any time."]
2937    MAV_STATE_STANDBY = 3,
2938    #[doc = "System is active and might be already airborne. Motors are engaged."]
2939    MAV_STATE_ACTIVE = 4,
2940    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
2941    MAV_STATE_CRITICAL = 5,
2942    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
2943    MAV_STATE_EMERGENCY = 6,
2944    #[doc = "System just initialized its power-down sequence, will shut down now."]
2945    MAV_STATE_POWEROFF = 7,
2946    #[doc = "System is terminating itself (failsafe or commanded)."]
2947    MAV_STATE_FLIGHT_TERMINATION = 8,
2948}
2949impl MavState {
2950    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
2951}
2952impl Default for MavState {
2953    fn default() -> Self {
2954        Self::DEFAULT
2955    }
2956}
2957#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2959#[cfg_attr(feature = "serde", serde(tag = "type"))]
2960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2961#[repr(u32)]
2962#[doc = "List of possible failure type to inject."]
2963pub enum FailureType {
2964    #[doc = "No failure injected, used to reset a previous failure."]
2965    FAILURE_TYPE_OK = 0,
2966    #[doc = "Sets unit off, so completely non-responsive."]
2967    FAILURE_TYPE_OFF = 1,
2968    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
2969    FAILURE_TYPE_STUCK = 2,
2970    #[doc = "Unit is reporting complete garbage."]
2971    FAILURE_TYPE_GARBAGE = 3,
2972    #[doc = "Unit is consistently wrong."]
2973    FAILURE_TYPE_WRONG = 4,
2974    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
2975    FAILURE_TYPE_SLOW = 5,
2976    #[doc = "Data of unit is delayed in time."]
2977    FAILURE_TYPE_DELAYED = 6,
2978    #[doc = "Unit is sometimes working, sometimes not."]
2979    FAILURE_TYPE_INTERMITTENT = 7,
2980}
2981impl FailureType {
2982    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
2983}
2984impl Default for FailureType {
2985    fn default() -> Self {
2986        Self::DEFAULT
2987    }
2988}
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
2995pub enum MavRoi {
2996    #[doc = "No region of interest."]
2997    MAV_ROI_NONE = 0,
2998    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
2999    MAV_ROI_WPNEXT = 1,
3000    #[doc = "Point toward given waypoint."]
3001    MAV_ROI_WPINDEX = 2,
3002    #[doc = "Point toward fixed location."]
3003    MAV_ROI_LOCATION = 3,
3004    #[doc = "Point toward of given id."]
3005    MAV_ROI_TARGET = 4,
3006}
3007impl MavRoi {
3008    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3009}
3010impl Default for MavRoi {
3011    fn default() -> Self {
3012        Self::DEFAULT
3013    }
3014}
3015#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3017#[cfg_attr(feature = "serde", serde(tag = "type"))]
3018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3019#[repr(u32)]
3020#[doc = "Modes of illuminator"]
3021pub enum IlluminatorMode {
3022    #[doc = "Illuminator mode is not specified/unknown"]
3023    ILLUMINATOR_MODE_UNKNOWN = 0,
3024    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
3025    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
3026    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
3027    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
3028}
3029impl IlluminatorMode {
3030    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
3031}
3032impl Default for IlluminatorMode {
3033    fn default() -> Self {
3034        Self::DEFAULT
3035    }
3036}
3037#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3039#[cfg_attr(feature = "serde", serde(tag = "type"))]
3040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3041#[repr(u32)]
3042#[doc = "WiFi Mode."]
3043pub enum WifiConfigApMode {
3044    #[doc = "WiFi mode is undefined."]
3045    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
3046    #[doc = "WiFi configured as an access point."]
3047    WIFI_CONFIG_AP_MODE_AP = 1,
3048    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
3049    WIFI_CONFIG_AP_MODE_STATION = 2,
3050    #[doc = "WiFi disabled."]
3051    WIFI_CONFIG_AP_MODE_DISABLED = 3,
3052}
3053impl WifiConfigApMode {
3054    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
3055}
3056impl Default for WifiConfigApMode {
3057    fn default() -> Self {
3058        Self::DEFAULT
3059    }
3060}
3061#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3063#[cfg_attr(feature = "serde", serde(tag = "type"))]
3064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3065#[repr(u32)]
3066pub enum MavTunnelPayloadType {
3067    #[doc = "Encoding of payload unknown."]
3068    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3069    #[doc = "Registered for STorM32 gimbal controller."]
3070    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3071    #[doc = "Registered for STorM32 gimbal controller."]
3072    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3073    #[doc = "Registered for STorM32 gimbal controller."]
3074    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3075    #[doc = "Registered for STorM32 gimbal controller."]
3076    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3077    #[doc = "Registered for STorM32 gimbal controller."]
3078    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3079    #[doc = "Registered for STorM32 gimbal controller."]
3080    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3081    #[doc = "Registered for STorM32 gimbal controller."]
3082    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3083    #[doc = "Registered for STorM32 gimbal controller."]
3084    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3085    #[doc = "Registered for STorM32 gimbal controller."]
3086    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3087    #[doc = "Registered for STorM32 gimbal controller."]
3088    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3089    #[doc = "Registered for ModalAI remote OSD protocol."]
3090    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3091    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3092    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3093    #[doc = "Registered for ModalAI vendor use."]
3094    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3095}
3096impl MavTunnelPayloadType {
3097    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3098}
3099impl Default for MavTunnelPayloadType {
3100    fn default() -> Self {
3101        Self::DEFAULT
3102    }
3103}
3104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3106#[cfg_attr(feature = "serde", serde(tag = "type"))]
3107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3108#[repr(u32)]
3109#[doc = "SERIAL_CONTROL device types"]
3110pub enum SerialControlDev {
3111    #[doc = "First telemetry port"]
3112    SERIAL_CONTROL_DEV_TELEM1 = 0,
3113    #[doc = "Second telemetry port"]
3114    SERIAL_CONTROL_DEV_TELEM2 = 1,
3115    #[doc = "First GPS port"]
3116    SERIAL_CONTROL_DEV_GPS1 = 2,
3117    #[doc = "Second GPS port"]
3118    SERIAL_CONTROL_DEV_GPS2 = 3,
3119    #[doc = "system shell"]
3120    SERIAL_CONTROL_DEV_SHELL = 10,
3121    #[doc = "SERIAL0"]
3122    SERIAL_CONTROL_SERIAL0 = 100,
3123    #[doc = "SERIAL1"]
3124    SERIAL_CONTROL_SERIAL1 = 101,
3125    #[doc = "SERIAL2"]
3126    SERIAL_CONTROL_SERIAL2 = 102,
3127    #[doc = "SERIAL3"]
3128    SERIAL_CONTROL_SERIAL3 = 103,
3129    #[doc = "SERIAL4"]
3130    SERIAL_CONTROL_SERIAL4 = 104,
3131    #[doc = "SERIAL5"]
3132    SERIAL_CONTROL_SERIAL5 = 105,
3133    #[doc = "SERIAL6"]
3134    SERIAL_CONTROL_SERIAL6 = 106,
3135    #[doc = "SERIAL7"]
3136    SERIAL_CONTROL_SERIAL7 = 107,
3137    #[doc = "SERIAL8"]
3138    SERIAL_CONTROL_SERIAL8 = 108,
3139    #[doc = "SERIAL9"]
3140    SERIAL_CONTROL_SERIAL9 = 109,
3141}
3142impl SerialControlDev {
3143    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
3144}
3145impl Default for SerialControlDev {
3146    fn default() -> Self {
3147        Self::DEFAULT
3148    }
3149}
3150#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3152#[cfg_attr(feature = "serde", serde(tag = "type"))]
3153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3154#[repr(u32)]
3155#[doc = "Reason for an event error response."]
3156pub enum MavEventErrorReason {
3157    #[doc = "The requested event is not available (anymore)."]
3158    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
3159}
3160impl MavEventErrorReason {
3161    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
3162}
3163impl Default for MavEventErrorReason {
3164    fn default() -> Self {
3165        Self::DEFAULT
3166    }
3167}
3168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3170#[cfg_attr(feature = "serde", serde(tag = "type"))]
3171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3172#[repr(u32)]
3173#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3174pub enum MavParamExtType {
3175    #[doc = "8-bit unsigned integer"]
3176    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3177    #[doc = "8-bit signed integer"]
3178    MAV_PARAM_EXT_TYPE_INT8 = 2,
3179    #[doc = "16-bit unsigned integer"]
3180    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3181    #[doc = "16-bit signed integer"]
3182    MAV_PARAM_EXT_TYPE_INT16 = 4,
3183    #[doc = "32-bit unsigned integer"]
3184    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3185    #[doc = "32-bit signed integer"]
3186    MAV_PARAM_EXT_TYPE_INT32 = 6,
3187    #[doc = "64-bit unsigned integer"]
3188    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3189    #[doc = "64-bit signed integer"]
3190    MAV_PARAM_EXT_TYPE_INT64 = 8,
3191    #[doc = "32-bit floating-point"]
3192    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3193    #[doc = "64-bit floating-point"]
3194    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3195    #[doc = "Custom Type"]
3196    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3197}
3198impl MavParamExtType {
3199    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3200}
3201impl Default for MavParamExtType {
3202    fn default() -> Self {
3203        Self::DEFAULT
3204    }
3205}
3206#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3208#[cfg_attr(feature = "serde", serde(tag = "type"))]
3209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3210#[repr(u32)]
3211#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3212pub enum PrecisionLandMode {
3213    #[doc = "Normal (non-precision) landing."]
3214    PRECISION_LAND_MODE_DISABLED = 0,
3215    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3216    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3217    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3218    PRECISION_LAND_MODE_REQUIRED = 2,
3219}
3220impl PrecisionLandMode {
3221    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3222}
3223impl Default for PrecisionLandMode {
3224    fn default() -> Self {
3225        Self::DEFAULT
3226    }
3227}
3228#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3230#[cfg_attr(feature = "serde", serde(tag = "type"))]
3231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3232#[repr(u32)]
3233#[doc = "Yaw behaviour during orbit flight."]
3234pub enum OrbitYawBehaviour {
3235    #[doc = "Vehicle front points to the center (default)."]
3236    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3237    #[doc = "Vehicle front holds heading when message received."]
3238    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3239    #[doc = "Yaw uncontrolled."]
3240    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3241    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3242    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3243    #[doc = "Yaw controlled by RC input."]
3244    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3245    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3246    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3247}
3248impl OrbitYawBehaviour {
3249    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3250}
3251impl Default for OrbitYawBehaviour {
3252    fn default() -> Self {
3253        Self::DEFAULT
3254    }
3255}
3256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3258#[cfg_attr(feature = "serde", serde(tag = "type"))]
3259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3260#[repr(u32)]
3261#[doc = "Flags to indicate the status of camera storage."]
3262pub enum StorageStatus {
3263    #[doc = "Storage is missing (no microSD card loaded for example.)"]
3264    STORAGE_STATUS_EMPTY = 0,
3265    #[doc = "Storage present but unformatted."]
3266    STORAGE_STATUS_UNFORMATTED = 1,
3267    #[doc = "Storage present and ready."]
3268    STORAGE_STATUS_READY = 2,
3269    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
3270    STORAGE_STATUS_NOT_SUPPORTED = 3,
3271}
3272impl StorageStatus {
3273    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
3274}
3275impl Default for StorageStatus {
3276    fn default() -> Self {
3277        Self::DEFAULT
3278    }
3279}
3280#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3282#[cfg_attr(feature = "serde", serde(tag = "type"))]
3283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3284#[repr(u32)]
3285pub enum MavOdidClassificationType {
3286    #[doc = "The classification type for the UA is undeclared."]
3287    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3288    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3289    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3290}
3291impl MavOdidClassificationType {
3292    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3293}
3294impl Default for MavOdidClassificationType {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3301#[cfg_attr(feature = "serde", serde(tag = "type"))]
3302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3303#[repr(u32)]
3304pub enum MavOdidAuthType {
3305    #[doc = "No authentication type is specified."]
3306    MAV_ODID_AUTH_TYPE_NONE = 0,
3307    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
3308    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
3309    #[doc = "Signature for the Operator ID."]
3310    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
3311    #[doc = "Signature for the entire message set."]
3312    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
3313    #[doc = "Authentication is provided by Network Remote ID."]
3314    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
3315    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
3316    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
3317}
3318impl MavOdidAuthType {
3319    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
3320}
3321impl Default for MavOdidAuthType {
3322    fn default() -> Self {
3323        Self::DEFAULT
3324    }
3325}
3326#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3328#[cfg_attr(feature = "serde", serde(tag = "type"))]
3329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3330#[repr(u32)]
3331#[doc = "Enumeration of sensor orientation, according to its rotations"]
3332pub enum MavSensorOrientation {
3333    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3334    MAV_SENSOR_ROTATION_NONE = 0,
3335    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3336    MAV_SENSOR_ROTATION_YAW_45 = 1,
3337    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3338    MAV_SENSOR_ROTATION_YAW_90 = 2,
3339    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3340    MAV_SENSOR_ROTATION_YAW_135 = 3,
3341    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3342    MAV_SENSOR_ROTATION_YAW_180 = 4,
3343    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3344    MAV_SENSOR_ROTATION_YAW_225 = 5,
3345    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3346    MAV_SENSOR_ROTATION_YAW_270 = 6,
3347    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3348    MAV_SENSOR_ROTATION_YAW_315 = 7,
3349    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3350    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3351    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3352    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3353    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3354    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3355    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3356    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3357    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3358    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3359    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3360    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3361    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3362    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3363    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3364    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3365    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3366    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3367    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3368    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3369    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3370    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3371    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3372    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3373    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3374    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3375    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3376    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3377    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3378    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3379    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3380    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3381    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3382    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3383    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3384    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3385    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3386    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3387    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3388    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3389    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3390    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3391    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3392    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3393    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3394    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3395    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3396    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3397    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3398    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3399    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3400    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3401    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3402    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3403    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3404    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3405    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3406    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3407    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3408    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3409    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3410    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3411    #[doc = "Pitch: 315"]
3412    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3413    #[doc = "Roll: 90, Pitch: 315"]
3414    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3415    #[doc = "Custom orientation"]
3416    MAV_SENSOR_ROTATION_CUSTOM = 100,
3417}
3418impl MavSensorOrientation {
3419    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3420}
3421impl Default for MavSensorOrientation {
3422    fn default() -> Self {
3423        Self::DEFAULT
3424    }
3425}
3426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3428#[cfg_attr(feature = "serde", serde(tag = "type"))]
3429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3430#[repr(u32)]
3431#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
3432pub enum FenceType {
3433    #[doc = "Maximum altitude fence"]
3434    FENCE_TYPE_ALT_MAX = 1,
3435    #[doc = "Circle fence"]
3436    FENCE_TYPE_CIRCLE = 2,
3437    #[doc = "Polygon fence"]
3438    FENCE_TYPE_POLYGON = 4,
3439    #[doc = "Minimum altitude fence"]
3440    FENCE_TYPE_ALT_MIN = 8,
3441}
3442impl FenceType {
3443    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
3444}
3445impl Default for FenceType {
3446    fn default() -> Self {
3447        Self::DEFAULT
3448    }
3449}
3450bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
3451impl VideoStreamStatusFlags {
3452    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
3453}
3454impl Default for VideoStreamStatusFlags {
3455    fn default() -> Self {
3456        Self::DEFAULT
3457    }
3458}
3459#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3461#[cfg_attr(feature = "serde", serde(tag = "type"))]
3462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3463#[repr(u32)]
3464#[doc = "List of possible units where failures can be injected."]
3465pub enum FailureUnit {
3466    FAILURE_UNIT_SENSOR_GYRO = 0,
3467    FAILURE_UNIT_SENSOR_ACCEL = 1,
3468    FAILURE_UNIT_SENSOR_MAG = 2,
3469    FAILURE_UNIT_SENSOR_BARO = 3,
3470    FAILURE_UNIT_SENSOR_GPS = 4,
3471    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
3472    FAILURE_UNIT_SENSOR_VIO = 6,
3473    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
3474    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
3475    FAILURE_UNIT_SYSTEM_BATTERY = 100,
3476    FAILURE_UNIT_SYSTEM_MOTOR = 101,
3477    FAILURE_UNIT_SYSTEM_SERVO = 102,
3478    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
3479    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
3480    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
3481}
3482impl FailureUnit {
3483    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
3484}
3485impl Default for FailureUnit {
3486    fn default() -> Self {
3487        Self::DEFAULT
3488    }
3489}
3490#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3492#[cfg_attr(feature = "serde", serde(tag = "type"))]
3493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3494#[repr(u32)]
3495#[doc = "Enumeration of estimator types"]
3496pub enum MavEstimatorType {
3497    #[doc = "Unknown type of the estimator."]
3498    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
3499    #[doc = "This is a naive estimator without any real covariance feedback."]
3500    MAV_ESTIMATOR_TYPE_NAIVE = 1,
3501    #[doc = "Computer vision based estimate. Might be up to scale."]
3502    MAV_ESTIMATOR_TYPE_VISION = 2,
3503    #[doc = "Visual-inertial estimate."]
3504    MAV_ESTIMATOR_TYPE_VIO = 3,
3505    #[doc = "Plain GPS estimate."]
3506    MAV_ESTIMATOR_TYPE_GPS = 4,
3507    #[doc = "Estimator integrating GPS and inertial sensing."]
3508    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
3509    #[doc = "Estimate from external motion capturing system."]
3510    MAV_ESTIMATOR_TYPE_MOCAP = 6,
3511    #[doc = "Estimator based on lidar sensor input."]
3512    MAV_ESTIMATOR_TYPE_LIDAR = 7,
3513    #[doc = "Estimator on autopilot."]
3514    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
3515}
3516impl MavEstimatorType {
3517    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
3518}
3519impl Default for MavEstimatorType {
3520    fn default() -> Self {
3521        Self::DEFAULT
3522    }
3523}
3524#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3526#[cfg_attr(feature = "serde", serde(tag = "type"))]
3527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3528#[repr(u32)]
3529#[doc = "Enumeration for battery charge states."]
3530pub enum MavBatteryChargeState {
3531    #[doc = "Low battery state is not provided"]
3532    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
3533    #[doc = "Battery is not in low state. Normal operation."]
3534    MAV_BATTERY_CHARGE_STATE_OK = 1,
3535    #[doc = "Battery state is low, warn and monitor close."]
3536    MAV_BATTERY_CHARGE_STATE_LOW = 2,
3537    #[doc = "Battery state is critical, return or abort immediately."]
3538    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
3539    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
3540    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
3541    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
3542    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
3543    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
3544    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
3545    #[doc = "Battery is charging."]
3546    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
3547}
3548impl MavBatteryChargeState {
3549    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
3550}
3551impl Default for MavBatteryChargeState {
3552    fn default() -> Self {
3553        Self::DEFAULT
3554    }
3555}
3556#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3558#[cfg_attr(feature = "serde", serde(tag = "type"))]
3559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3560#[repr(u32)]
3561#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3562pub enum RtkBaselineCoordinateSystem {
3563    #[doc = "Earth-centered, Earth-fixed"]
3564    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3565    #[doc = "RTK basestation centered, north, east, down"]
3566    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3567}
3568impl RtkBaselineCoordinateSystem {
3569    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3570}
3571impl Default for RtkBaselineCoordinateSystem {
3572    fn default() -> Self {
3573        Self::DEFAULT
3574    }
3575}
3576#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3578#[cfg_attr(feature = "serde", serde(tag = "type"))]
3579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3580#[repr(u32)]
3581#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3582pub enum MavType {
3583    #[doc = "Generic micro air vehicle"]
3584    MAV_TYPE_GENERIC = 0,
3585    #[doc = "Fixed wing aircraft."]
3586    MAV_TYPE_FIXED_WING = 1,
3587    #[doc = "Quadrotor"]
3588    MAV_TYPE_QUADROTOR = 2,
3589    #[doc = "Coaxial helicopter"]
3590    MAV_TYPE_COAXIAL = 3,
3591    #[doc = "Normal helicopter with tail rotor."]
3592    MAV_TYPE_HELICOPTER = 4,
3593    #[doc = "Ground installation"]
3594    MAV_TYPE_ANTENNA_TRACKER = 5,
3595    #[doc = "Operator control unit / ground control station"]
3596    MAV_TYPE_GCS = 6,
3597    #[doc = "Airship, controlled"]
3598    MAV_TYPE_AIRSHIP = 7,
3599    #[doc = "Free balloon, uncontrolled"]
3600    MAV_TYPE_FREE_BALLOON = 8,
3601    #[doc = "Rocket"]
3602    MAV_TYPE_ROCKET = 9,
3603    #[doc = "Ground rover"]
3604    MAV_TYPE_GROUND_ROVER = 10,
3605    #[doc = "Surface vessel, boat, ship"]
3606    MAV_TYPE_SURFACE_BOAT = 11,
3607    #[doc = "Submarine"]
3608    MAV_TYPE_SUBMARINE = 12,
3609    #[doc = "Hexarotor"]
3610    MAV_TYPE_HEXAROTOR = 13,
3611    #[doc = "Octorotor"]
3612    MAV_TYPE_OCTOROTOR = 14,
3613    #[doc = "Tricopter"]
3614    MAV_TYPE_TRICOPTER = 15,
3615    #[doc = "Flapping wing"]
3616    MAV_TYPE_FLAPPING_WING = 16,
3617    #[doc = "Kite"]
3618    MAV_TYPE_KITE = 17,
3619    #[doc = "Onboard companion controller"]
3620    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3621    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3622    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3623    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3624    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3625    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3626    MAV_TYPE_VTOL_TILTROTOR = 21,
3627    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3628    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3629    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3630    MAV_TYPE_VTOL_TAILSITTER = 23,
3631    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3632    MAV_TYPE_VTOL_TILTWING = 24,
3633    #[doc = "VTOL reserved 5"]
3634    MAV_TYPE_VTOL_RESERVED5 = 25,
3635    #[doc = "Gimbal"]
3636    MAV_TYPE_GIMBAL = 26,
3637    #[doc = "ADSB system"]
3638    MAV_TYPE_ADSB = 27,
3639    #[doc = "Steerable, nonrigid airfoil"]
3640    MAV_TYPE_PARAFOIL = 28,
3641    #[doc = "Dodecarotor"]
3642    MAV_TYPE_DODECAROTOR = 29,
3643    #[doc = "Camera"]
3644    MAV_TYPE_CAMERA = 30,
3645    #[doc = "Charging station"]
3646    MAV_TYPE_CHARGING_STATION = 31,
3647    #[doc = "FLARM collision avoidance system"]
3648    MAV_TYPE_FLARM = 32,
3649    #[doc = "Servo"]
3650    MAV_TYPE_SERVO = 33,
3651    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3652    MAV_TYPE_ODID = 34,
3653    #[doc = "Decarotor"]
3654    MAV_TYPE_DECAROTOR = 35,
3655    #[doc = "Battery"]
3656    MAV_TYPE_BATTERY = 36,
3657    #[doc = "Parachute"]
3658    MAV_TYPE_PARACHUTE = 37,
3659    #[doc = "Log"]
3660    MAV_TYPE_LOG = 38,
3661    #[doc = "OSD"]
3662    MAV_TYPE_OSD = 39,
3663    #[doc = "IMU"]
3664    MAV_TYPE_IMU = 40,
3665    #[doc = "GPS"]
3666    MAV_TYPE_GPS = 41,
3667    #[doc = "Winch"]
3668    MAV_TYPE_WINCH = 42,
3669    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3670    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3671    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3672    MAV_TYPE_ILLUMINATOR = 44,
3673    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3674    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3675}
3676impl MavType {
3677    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3678}
3679impl Default for MavType {
3680    fn default() -> Self {
3681        Self::DEFAULT
3682    }
3683}
3684#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3686#[cfg_attr(feature = "serde", serde(tag = "type"))]
3687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3688#[repr(u32)]
3689#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
3690pub enum WifiConfigApResponse {
3691    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
3692    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
3693    #[doc = "Changes accepted."]
3694    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
3695    #[doc = "Changes rejected."]
3696    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
3697    #[doc = "Invalid Mode."]
3698    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
3699    #[doc = "Invalid SSID."]
3700    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
3701    #[doc = "Invalid Password."]
3702    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
3703}
3704impl WifiConfigApResponse {
3705    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
3706}
3707impl Default for WifiConfigApResponse {
3708    fn default() -> Self {
3709        Self::DEFAULT
3710    }
3711}
3712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3714#[cfg_attr(feature = "serde", serde(tag = "type"))]
3715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3716#[repr(u32)]
3717pub enum MavOdidHeightRef {
3718    #[doc = "The height field is relative to the take-off location."]
3719    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3720    #[doc = "The height field is relative to ground."]
3721    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3722}
3723impl MavOdidHeightRef {
3724    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3725}
3726impl Default for MavOdidHeightRef {
3727    fn default() -> Self {
3728        Self::DEFAULT
3729    }
3730}
3731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3733#[cfg_attr(feature = "serde", serde(tag = "type"))]
3734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3735#[repr(u32)]
3736#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
3737pub enum AdsbEmitterType {
3738    ADSB_EMITTER_TYPE_NO_INFO = 0,
3739    ADSB_EMITTER_TYPE_LIGHT = 1,
3740    ADSB_EMITTER_TYPE_SMALL = 2,
3741    ADSB_EMITTER_TYPE_LARGE = 3,
3742    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
3743    ADSB_EMITTER_TYPE_HEAVY = 5,
3744    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
3745    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
3746    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
3747    ADSB_EMITTER_TYPE_GLIDER = 9,
3748    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
3749    ADSB_EMITTER_TYPE_PARACHUTE = 11,
3750    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
3751    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
3752    ADSB_EMITTER_TYPE_UAV = 14,
3753    ADSB_EMITTER_TYPE_SPACE = 15,
3754    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
3755    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
3756    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
3757    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
3758}
3759impl AdsbEmitterType {
3760    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
3761}
3762impl Default for AdsbEmitterType {
3763    fn default() -> Self {
3764        Self::DEFAULT
3765    }
3766}
3767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3769#[cfg_attr(feature = "serde", serde(tag = "type"))]
3770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3771#[repr(u32)]
3772#[doc = "Airborne status of UAS."]
3773pub enum UtmFlightState {
3774    #[doc = "The flight state can't be determined."]
3775    UTM_FLIGHT_STATE_UNKNOWN = 1,
3776    #[doc = "UAS on ground."]
3777    UTM_FLIGHT_STATE_GROUND = 2,
3778    #[doc = "UAS airborne."]
3779    UTM_FLIGHT_STATE_AIRBORNE = 3,
3780    #[doc = "UAS is in an emergency flight state."]
3781    UTM_FLIGHT_STATE_EMERGENCY = 16,
3782    #[doc = "UAS has no active controls."]
3783    UTM_FLIGHT_STATE_NOCTRL = 32,
3784}
3785impl UtmFlightState {
3786    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
3787}
3788impl Default for UtmFlightState {
3789    fn default() -> Self {
3790        Self::DEFAULT
3791    }
3792}
3793#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3795#[cfg_attr(feature = "serde", serde(tag = "type"))]
3796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3797#[repr(u32)]
3798#[doc = "Winch actions."]
3799pub enum WinchActions {
3800    #[doc = "Allow motor to freewheel."]
3801    WINCH_RELAXED = 0,
3802    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
3803    WINCH_RELATIVE_LENGTH_CONTROL = 1,
3804    #[doc = "Wind or unwind line at specified rate."]
3805    WINCH_RATE_CONTROL = 2,
3806    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
3807    WINCH_LOCK = 3,
3808    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
3809    WINCH_DELIVER = 4,
3810    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
3811    WINCH_HOLD = 5,
3812    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
3813    WINCH_RETRACT = 6,
3814    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
3815    WINCH_LOAD_LINE = 7,
3816    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
3817    WINCH_ABANDON_LINE = 8,
3818    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
3819    WINCH_LOAD_PAYLOAD = 9,
3820}
3821impl WinchActions {
3822    pub const DEFAULT: Self = Self::WINCH_RELAXED;
3823}
3824impl Default for WinchActions {
3825    fn default() -> Self {
3826        Self::DEFAULT
3827    }
3828}
3829#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3831#[cfg_attr(feature = "serde", serde(tag = "type"))]
3832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3833#[repr(u32)]
3834#[doc = "Specifies the datatype of a MAVLink parameter."]
3835pub enum MavParamType {
3836    #[doc = "8-bit unsigned integer"]
3837    MAV_PARAM_TYPE_UINT8 = 1,
3838    #[doc = "8-bit signed integer"]
3839    MAV_PARAM_TYPE_INT8 = 2,
3840    #[doc = "16-bit unsigned integer"]
3841    MAV_PARAM_TYPE_UINT16 = 3,
3842    #[doc = "16-bit signed integer"]
3843    MAV_PARAM_TYPE_INT16 = 4,
3844    #[doc = "32-bit unsigned integer"]
3845    MAV_PARAM_TYPE_UINT32 = 5,
3846    #[doc = "32-bit signed integer"]
3847    MAV_PARAM_TYPE_INT32 = 6,
3848    #[doc = "64-bit unsigned integer"]
3849    MAV_PARAM_TYPE_UINT64 = 7,
3850    #[doc = "64-bit signed integer"]
3851    MAV_PARAM_TYPE_INT64 = 8,
3852    #[doc = "32-bit floating-point"]
3853    MAV_PARAM_TYPE_REAL32 = 9,
3854    #[doc = "64-bit floating-point"]
3855    MAV_PARAM_TYPE_REAL64 = 10,
3856}
3857impl MavParamType {
3858    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3859}
3860impl Default for MavParamType {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3867#[cfg_attr(feature = "serde", serde(tag = "type"))]
3868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3869#[repr(u32)]
3870#[doc = "Result from PARAM_EXT_SET message."]
3871pub enum ParamAck {
3872    #[doc = "Parameter value ACCEPTED and SET"]
3873    PARAM_ACK_ACCEPTED = 0,
3874    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3875    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3876    #[doc = "Parameter failed to set"]
3877    PARAM_ACK_FAILED = 2,
3878    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3879    PARAM_ACK_IN_PROGRESS = 3,
3880}
3881impl ParamAck {
3882    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3883}
3884impl Default for ParamAck {
3885    fn default() -> Self {
3886        Self::DEFAULT
3887    }
3888}
3889bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
3890impl CameraCapFlags {
3891    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
3892}
3893impl Default for CameraCapFlags {
3894    fn default() -> Self {
3895        Self::DEFAULT
3896    }
3897}
3898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3900#[cfg_attr(feature = "serde", serde(tag = "type"))]
3901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3902#[repr(u32)]
3903pub enum GsmModemType {
3904    #[doc = "not specified"]
3905    GSM_MODEM_TYPE_UNKNOWN = 0,
3906    #[doc = "HUAWEI LTE USB Stick E3372"]
3907    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
3908}
3909impl GsmModemType {
3910    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
3911}
3912impl Default for GsmModemType {
3913    fn default() -> Self {
3914        Self::DEFAULT
3915    }
3916}
3917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3919#[cfg_attr(feature = "serde", serde(tag = "type"))]
3920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3921#[repr(u32)]
3922#[doc = "Type of mission items being requested/sent in mission protocol."]
3923pub enum MavMissionType {
3924    #[doc = "Items are mission commands for main mission."]
3925    MAV_MISSION_TYPE_MISSION = 0,
3926    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
3927    MAV_MISSION_TYPE_FENCE = 1,
3928    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
3929    MAV_MISSION_TYPE_RALLY = 2,
3930    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
3931    MAV_MISSION_TYPE_ALL = 255,
3932}
3933impl MavMissionType {
3934    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
3935}
3936impl Default for MavMissionType {
3937    fn default() -> Self {
3938        Self::DEFAULT
3939    }
3940}
3941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3943#[cfg_attr(feature = "serde", serde(tag = "type"))]
3944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3945#[repr(u32)]
3946#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
3947pub enum MavModeFlagDecodePosition {
3948    #[doc = "First bit:  10000000"]
3949    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
3950    #[doc = "Second bit: 01000000"]
3951    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
3952    #[doc = "Third bit:  00100000"]
3953    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
3954    #[doc = "Fourth bit: 00010000"]
3955    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
3956    #[doc = "Fifth bit:  00001000"]
3957    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
3958    #[doc = "Sixth bit:   00000100"]
3959    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
3960    #[doc = "Seventh bit: 00000010"]
3961    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
3962    #[doc = "Eighth bit: 00000001"]
3963    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
3964}
3965impl MavModeFlagDecodePosition {
3966    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
3967}
3968impl Default for MavModeFlagDecodePosition {
3969    fn default() -> Self {
3970        Self::DEFAULT
3971    }
3972}
3973bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3974impl MavWinchStatusFlag {
3975    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3976}
3977impl Default for MavWinchStatusFlag {
3978    fn default() -> Self {
3979        Self::DEFAULT
3980    }
3981}
3982bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
3983impl MavBatteryFault {
3984    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
3985}
3986impl Default for MavBatteryFault {
3987    fn default() -> Self {
3988        Self::DEFAULT
3989    }
3990}
3991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3993#[cfg_attr(feature = "serde", serde(tag = "type"))]
3994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3995#[repr(u32)]
3996#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
3997pub enum AutotuneAxis {
3998    #[doc = "Autotune roll axis."]
3999    AUTOTUNE_AXIS_ROLL = 1,
4000    #[doc = "Autotune pitch axis."]
4001    AUTOTUNE_AXIS_PITCH = 2,
4002    #[doc = "Autotune yaw axis."]
4003    AUTOTUNE_AXIS_YAW = 4,
4004}
4005impl AutotuneAxis {
4006    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
4007}
4008impl Default for AutotuneAxis {
4009    fn default() -> Self {
4010        Self::DEFAULT
4011    }
4012}
4013#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4015#[cfg_attr(feature = "serde", serde(tag = "type"))]
4016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4017#[repr(u32)]
4018pub enum MavOdidHorAcc {
4019    #[doc = "The horizontal accuracy is unknown."]
4020    MAV_ODID_HOR_ACC_UNKNOWN = 0,
4021    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4022    MAV_ODID_HOR_ACC_10NM = 1,
4023    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4024    MAV_ODID_HOR_ACC_4NM = 2,
4025    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4026    MAV_ODID_HOR_ACC_2NM = 3,
4027    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4028    MAV_ODID_HOR_ACC_1NM = 4,
4029    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4030    MAV_ODID_HOR_ACC_0_5NM = 5,
4031    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4032    MAV_ODID_HOR_ACC_0_3NM = 6,
4033    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4034    MAV_ODID_HOR_ACC_0_1NM = 7,
4035    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4036    MAV_ODID_HOR_ACC_0_05NM = 8,
4037    #[doc = "The horizontal accuracy is smaller than 30 meter."]
4038    MAV_ODID_HOR_ACC_30_METER = 9,
4039    #[doc = "The horizontal accuracy is smaller than 10 meter."]
4040    MAV_ODID_HOR_ACC_10_METER = 10,
4041    #[doc = "The horizontal accuracy is smaller than 3 meter."]
4042    MAV_ODID_HOR_ACC_3_METER = 11,
4043    #[doc = "The horizontal accuracy is smaller than 1 meter."]
4044    MAV_ODID_HOR_ACC_1_METER = 12,
4045}
4046impl MavOdidHorAcc {
4047    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4048}
4049impl Default for MavOdidHorAcc {
4050    fn default() -> Self {
4051        Self::DEFAULT
4052    }
4053}
4054#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4056#[cfg_attr(feature = "serde", serde(tag = "type"))]
4057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4058#[repr(u32)]
4059#[doc = "Enumeration of distance sensor types"]
4060pub enum MavDistanceSensor {
4061    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
4062    MAV_DISTANCE_SENSOR_LASER = 0,
4063    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
4064    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
4065    #[doc = "Infrared rangefinder, e.g. Sharp units"]
4066    MAV_DISTANCE_SENSOR_INFRARED = 2,
4067    #[doc = "Radar type, e.g. uLanding units"]
4068    MAV_DISTANCE_SENSOR_RADAR = 3,
4069    #[doc = "Broken or unknown type, e.g. analog units"]
4070    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
4071}
4072impl MavDistanceSensor {
4073    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
4074}
4075impl Default for MavDistanceSensor {
4076    fn default() -> Self {
4077        Self::DEFAULT
4078    }
4079}
4080#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4082#[cfg_attr(feature = "serde", serde(tag = "type"))]
4083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4084#[repr(u32)]
4085#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4086pub enum TuneFormat {
4087    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4088    TUNE_FORMAT_QBASIC1_1 = 1,
4089    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4090    TUNE_FORMAT_MML_MODERN = 2,
4091}
4092impl TuneFormat {
4093    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4094}
4095impl Default for TuneFormat {
4096    fn default() -> Self {
4097        Self::DEFAULT
4098    }
4099}
4100bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
4101impl EscFailureFlags {
4102    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
4103}
4104impl Default for EscFailureFlags {
4105    fn default() -> Self {
4106        Self::DEFAULT
4107    }
4108}
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114pub enum MavOdidIdType {
4115    #[doc = "No type defined."]
4116    MAV_ODID_ID_TYPE_NONE = 0,
4117    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
4118    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
4119    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
4120    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
4121    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
4122    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
4123    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
4124    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
4125}
4126impl MavOdidIdType {
4127    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
4128}
4129impl Default for MavOdidIdType {
4130    fn default() -> Self {
4131        Self::DEFAULT
4132    }
4133}
4134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4136#[cfg_attr(feature = "serde", serde(tag = "type"))]
4137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4138#[repr(u32)]
4139pub enum NavVtolLandOptions {
4140    #[doc = "Default autopilot landing behaviour."]
4141    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4142    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4143    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4144    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4145    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4146}
4147impl NavVtolLandOptions {
4148    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4149}
4150impl Default for NavVtolLandOptions {
4151    fn default() -> Self {
4152        Self::DEFAULT
4153    }
4154}
4155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4157#[cfg_attr(feature = "serde", serde(tag = "type"))]
4158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4159#[repr(u32)]
4160#[doc = "Possible responses from a CELLULAR_CONFIG message."]
4161pub enum CellularConfigResponse {
4162    #[doc = "Changes accepted."]
4163    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
4164    #[doc = "Invalid APN."]
4165    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
4166    #[doc = "Invalid PIN."]
4167    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
4168    #[doc = "Changes rejected."]
4169    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
4170    #[doc = "PUK is required to unblock SIM card."]
4171    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
4172}
4173impl CellularConfigResponse {
4174    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
4175}
4176impl Default for CellularConfigResponse {
4177    fn default() -> Self {
4178        Self::DEFAULT
4179    }
4180}
4181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4183#[cfg_attr(feature = "serde", serde(tag = "type"))]
4184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4185#[repr(u32)]
4186#[doc = "Possible safety switch states."]
4187pub enum SafetySwitchState {
4188    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4189    SAFETY_SWITCH_STATE_SAFE = 0,
4190    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4191    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4192}
4193impl SafetySwitchState {
4194    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4195}
4196impl Default for SafetySwitchState {
4197    fn default() -> Self {
4198        Self::DEFAULT
4199    }
4200}
4201#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4203#[cfg_attr(feature = "serde", serde(tag = "type"))]
4204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4205#[repr(u32)]
4206pub enum MavOdidTimeAcc {
4207    #[doc = "The timestamp accuracy is unknown."]
4208    MAV_ODID_TIME_ACC_UNKNOWN = 0,
4209    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
4210    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
4211    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
4212    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
4213    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
4214    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
4215    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
4216    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
4217    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
4218    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
4219    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
4220    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
4221    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
4222    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
4223    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
4224    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
4225    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
4226    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
4227    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
4228    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
4229    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
4230    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
4231    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
4232    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
4233    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
4234    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
4235    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
4236    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
4237    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
4238    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
4239}
4240impl MavOdidTimeAcc {
4241    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
4242}
4243impl Default for MavOdidTimeAcc {
4244    fn default() -> Self {
4245        Self::DEFAULT
4246    }
4247}
4248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4250#[cfg_attr(feature = "serde", serde(tag = "type"))]
4251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4252#[repr(u32)]
4253#[doc = "These flags encode the cellular network status"]
4254pub enum CellularStatusFlag {
4255    #[doc = "State unknown or not reportable."]
4256    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
4257    #[doc = "Modem is unusable"]
4258    CELLULAR_STATUS_FLAG_FAILED = 1,
4259    #[doc = "Modem is being initialized"]
4260    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
4261    #[doc = "Modem is locked"]
4262    CELLULAR_STATUS_FLAG_LOCKED = 3,
4263    #[doc = "Modem is not enabled and is powered down"]
4264    CELLULAR_STATUS_FLAG_DISABLED = 4,
4265    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
4266    CELLULAR_STATUS_FLAG_DISABLING = 5,
4267    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
4268    CELLULAR_STATUS_FLAG_ENABLING = 6,
4269    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
4270    CELLULAR_STATUS_FLAG_ENABLED = 7,
4271    #[doc = "Modem is searching for a network provider to register"]
4272    CELLULAR_STATUS_FLAG_SEARCHING = 8,
4273    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
4274    CELLULAR_STATUS_FLAG_REGISTERED = 9,
4275    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
4276    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
4277    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
4278    CELLULAR_STATUS_FLAG_CONNECTING = 11,
4279    #[doc = "One or more packet data bearers is active and connected"]
4280    CELLULAR_STATUS_FLAG_CONNECTED = 12,
4281}
4282impl CellularStatusFlag {
4283    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
4284}
4285impl Default for CellularStatusFlag {
4286    fn default() -> Self {
4287        Self::DEFAULT
4288    }
4289}
4290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4292#[cfg_attr(feature = "serde", serde(tag = "type"))]
4293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4294#[repr(u32)]
4295#[doc = "Camera tracking status flags"]
4296pub enum CameraTrackingStatusFlags {
4297    #[doc = "Camera is not tracking"]
4298    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
4299    #[doc = "Camera is tracking"]
4300    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
4301    #[doc = "Camera tracking in error state"]
4302    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
4303}
4304impl CameraTrackingStatusFlags {
4305    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
4306}
4307impl Default for CameraTrackingStatusFlags {
4308    fn default() -> Self {
4309        Self::DEFAULT
4310    }
4311}
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
4318pub enum MissionState {
4319    #[doc = "The mission status reporting is not supported."]
4320    MISSION_STATE_UNKNOWN = 0,
4321    #[doc = "No mission on the vehicle."]
4322    MISSION_STATE_NO_MISSION = 1,
4323    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
4324    MISSION_STATE_NOT_STARTED = 2,
4325    #[doc = "Mission is active, and will execute mission items when in auto mode."]
4326    MISSION_STATE_ACTIVE = 3,
4327    #[doc = "Mission is paused when in auto mode."]
4328    MISSION_STATE_PAUSED = 4,
4329    #[doc = "Mission has executed all mission items."]
4330    MISSION_STATE_COMPLETE = 5,
4331}
4332impl MissionState {
4333    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
4334}
4335impl Default for MissionState {
4336    fn default() -> Self {
4337        Self::DEFAULT
4338    }
4339}
4340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4342#[cfg_attr(feature = "serde", serde(tag = "type"))]
4343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4344#[repr(u32)]
4345#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
4346pub enum MavMountMode {
4347    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
4348    MAV_MOUNT_MODE_RETRACT = 0,
4349    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
4350    MAV_MOUNT_MODE_NEUTRAL = 1,
4351    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
4352    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
4353    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
4354    MAV_MOUNT_MODE_RC_TARGETING = 3,
4355    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
4356    MAV_MOUNT_MODE_GPS_POINT = 4,
4357    #[doc = "Gimbal tracks system with specified system ID"]
4358    MAV_MOUNT_MODE_SYSID_TARGET = 5,
4359    #[doc = "Gimbal tracks home position"]
4360    MAV_MOUNT_MODE_HOME_LOCATION = 6,
4361}
4362impl MavMountMode {
4363    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
4364}
4365impl Default for MavMountMode {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4372#[cfg_attr(feature = "serde", serde(tag = "type"))]
4373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4374#[repr(u32)]
4375#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
4376pub enum MavEventCurrentSequenceFlags {
4377    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
4378    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
4379}
4380impl MavEventCurrentSequenceFlags {
4381    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
4382}
4383impl Default for MavEventCurrentSequenceFlags {
4384    fn default() -> Self {
4385        Self::DEFAULT
4386    }
4387}
4388#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4390#[cfg_attr(feature = "serde", serde(tag = "type"))]
4391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4392#[repr(u32)]
4393#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
4394pub enum MavFrame {
4395    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
4396    MAV_FRAME_GLOBAL = 0,
4397    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4398    MAV_FRAME_LOCAL_NED = 1,
4399    #[doc = "NOT a coordinate frame, indicates a mission command."]
4400    MAV_FRAME_MISSION = 2,
4401    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
4402    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
4403    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
4404    MAV_FRAME_LOCAL_ENU = 4,
4405    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
4406    MAV_FRAME_GLOBAL_INT = 5,
4407    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
4408    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
4409    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
4410    MAV_FRAME_LOCAL_OFFSET_NED = 7,
4411    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
4412    MAV_FRAME_BODY_NED = 8,
4413    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
4414    MAV_FRAME_BODY_OFFSET_NED = 9,
4415    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
4416    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
4417    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
4418    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
4419    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4420    MAV_FRAME_BODY_FRD = 12,
4421    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
4422    MAV_FRAME_RESERVED_13 = 13,
4423    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
4424    MAV_FRAME_RESERVED_14 = 14,
4425    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
4426    MAV_FRAME_RESERVED_15 = 15,
4427    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
4428    MAV_FRAME_RESERVED_16 = 16,
4429    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
4430    MAV_FRAME_RESERVED_17 = 17,
4431    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
4432    MAV_FRAME_RESERVED_18 = 18,
4433    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
4434    MAV_FRAME_RESERVED_19 = 19,
4435    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4436    MAV_FRAME_LOCAL_FRD = 20,
4437    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4438    MAV_FRAME_LOCAL_FLU = 21,
4439}
4440impl MavFrame {
4441    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
4442}
4443impl Default for MavFrame {
4444    fn default() -> Self {
4445        Self::DEFAULT
4446    }
4447}
4448#[doc = "id: 76"]
4449#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
4450#[derive(Debug, Clone, PartialEq)]
4451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4453pub struct COMMAND_LONG_DATA {
4454    #[doc = "Parameter 1 (for the specific command)."]
4455    pub param1: f32,
4456    #[doc = "Parameter 2 (for the specific command)."]
4457    pub param2: f32,
4458    #[doc = "Parameter 3 (for the specific command)."]
4459    pub param3: f32,
4460    #[doc = "Parameter 4 (for the specific command)."]
4461    pub param4: f32,
4462    #[doc = "Parameter 5 (for the specific command)."]
4463    pub param5: f32,
4464    #[doc = "Parameter 6 (for the specific command)."]
4465    pub param6: f32,
4466    #[doc = "Parameter 7 (for the specific command)."]
4467    pub param7: f32,
4468    #[doc = "Command ID (of command to send)."]
4469    pub command: MavCmd,
4470    #[doc = "System which should execute the command"]
4471    pub target_system: u8,
4472    #[doc = "Component which should execute the command, 0 for all components"]
4473    pub target_component: u8,
4474    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
4475    pub confirmation: u8,
4476}
4477impl COMMAND_LONG_DATA {
4478    pub const ENCODED_LEN: usize = 33usize;
4479    pub const DEFAULT: Self = Self {
4480        param1: 0.0_f32,
4481        param2: 0.0_f32,
4482        param3: 0.0_f32,
4483        param4: 0.0_f32,
4484        param5: 0.0_f32,
4485        param6: 0.0_f32,
4486        param7: 0.0_f32,
4487        command: MavCmd::DEFAULT,
4488        target_system: 0_u8,
4489        target_component: 0_u8,
4490        confirmation: 0_u8,
4491    };
4492    #[cfg(feature = "arbitrary")]
4493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4494        use arbitrary::{Arbitrary, Unstructured};
4495        let mut buf = [0u8; 1024];
4496        rng.fill_bytes(&mut buf);
4497        let mut unstructured = Unstructured::new(&buf);
4498        Self::arbitrary(&mut unstructured).unwrap_or_default()
4499    }
4500}
4501impl Default for COMMAND_LONG_DATA {
4502    fn default() -> Self {
4503        Self::DEFAULT.clone()
4504    }
4505}
4506impl MessageData for COMMAND_LONG_DATA {
4507    type Message = MavMessage;
4508    const ID: u32 = 76u32;
4509    const NAME: &'static str = "COMMAND_LONG";
4510    const EXTRA_CRC: u8 = 152u8;
4511    const ENCODED_LEN: usize = 33usize;
4512    fn deser(
4513        _version: MavlinkVersion,
4514        __input: &[u8],
4515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4516        let avail_len = __input.len();
4517        let mut payload_buf = [0; Self::ENCODED_LEN];
4518        let mut buf = if avail_len < Self::ENCODED_LEN {
4519            payload_buf[0..avail_len].copy_from_slice(__input);
4520            Bytes::new(&payload_buf)
4521        } else {
4522            Bytes::new(__input)
4523        };
4524        let mut __struct = Self::default();
4525        __struct.param1 = buf.get_f32_le();
4526        __struct.param2 = buf.get_f32_le();
4527        __struct.param3 = buf.get_f32_le();
4528        __struct.param4 = buf.get_f32_le();
4529        __struct.param5 = buf.get_f32_le();
4530        __struct.param6 = buf.get_f32_le();
4531        __struct.param7 = buf.get_f32_le();
4532        let tmp = buf.get_u16_le();
4533        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
4534            ::mavlink_core::error::ParserError::InvalidEnum {
4535                enum_type: "MavCmd",
4536                value: tmp as u32,
4537            },
4538        )?;
4539        __struct.target_system = buf.get_u8();
4540        __struct.target_component = buf.get_u8();
4541        __struct.confirmation = buf.get_u8();
4542        Ok(__struct)
4543    }
4544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4545        let mut __tmp = BytesMut::new(bytes);
4546        #[allow(clippy::absurd_extreme_comparisons)]
4547        #[allow(unused_comparisons)]
4548        if __tmp.remaining() < Self::ENCODED_LEN {
4549            panic!(
4550                "buffer is too small (need {} bytes, but got {})",
4551                Self::ENCODED_LEN,
4552                __tmp.remaining(),
4553            )
4554        }
4555        __tmp.put_f32_le(self.param1);
4556        __tmp.put_f32_le(self.param2);
4557        __tmp.put_f32_le(self.param3);
4558        __tmp.put_f32_le(self.param4);
4559        __tmp.put_f32_le(self.param5);
4560        __tmp.put_f32_le(self.param6);
4561        __tmp.put_f32_le(self.param7);
4562        __tmp.put_u16_le(self.command as u16);
4563        __tmp.put_u8(self.target_system);
4564        __tmp.put_u8(self.target_component);
4565        __tmp.put_u8(self.confirmation);
4566        if matches!(version, MavlinkVersion::V2) {
4567            let len = __tmp.len();
4568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4569        } else {
4570            __tmp.len()
4571        }
4572    }
4573}
4574#[doc = "id: 246"]
4575#[doc = "The location and information of an ADSB vehicle."]
4576#[derive(Debug, Clone, PartialEq)]
4577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4579pub struct ADSB_VEHICLE_DATA {
4580    #[doc = "ICAO address"]
4581    pub ICAO_address: u32,
4582    #[doc = "Latitude"]
4583    pub lat: i32,
4584    #[doc = "Longitude"]
4585    pub lon: i32,
4586    #[doc = "Altitude(ASL)"]
4587    pub altitude: i32,
4588    #[doc = "Course over ground"]
4589    pub heading: u16,
4590    #[doc = "The horizontal velocity"]
4591    pub hor_velocity: u16,
4592    #[doc = "The vertical velocity. Positive is up"]
4593    pub ver_velocity: i16,
4594    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4595    pub flags: AdsbFlags,
4596    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4597    pub squawk: u16,
4598    #[doc = "ADSB altitude type."]
4599    pub altitude_type: AdsbAltitudeType,
4600    #[doc = "The callsign, 8+null"]
4601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4602    pub callsign: [u8; 9],
4603    #[doc = "ADSB emitter type."]
4604    pub emitter_type: AdsbEmitterType,
4605    #[doc = "Time since last communication in seconds"]
4606    pub tslc: u8,
4607}
4608impl ADSB_VEHICLE_DATA {
4609    pub const ENCODED_LEN: usize = 38usize;
4610    pub const DEFAULT: Self = Self {
4611        ICAO_address: 0_u32,
4612        lat: 0_i32,
4613        lon: 0_i32,
4614        altitude: 0_i32,
4615        heading: 0_u16,
4616        hor_velocity: 0_u16,
4617        ver_velocity: 0_i16,
4618        flags: AdsbFlags::DEFAULT,
4619        squawk: 0_u16,
4620        altitude_type: AdsbAltitudeType::DEFAULT,
4621        callsign: [0_u8; 9usize],
4622        emitter_type: AdsbEmitterType::DEFAULT,
4623        tslc: 0_u8,
4624    };
4625    #[cfg(feature = "arbitrary")]
4626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4627        use arbitrary::{Arbitrary, Unstructured};
4628        let mut buf = [0u8; 1024];
4629        rng.fill_bytes(&mut buf);
4630        let mut unstructured = Unstructured::new(&buf);
4631        Self::arbitrary(&mut unstructured).unwrap_or_default()
4632    }
4633}
4634impl Default for ADSB_VEHICLE_DATA {
4635    fn default() -> Self {
4636        Self::DEFAULT.clone()
4637    }
4638}
4639impl MessageData for ADSB_VEHICLE_DATA {
4640    type Message = MavMessage;
4641    const ID: u32 = 246u32;
4642    const NAME: &'static str = "ADSB_VEHICLE";
4643    const EXTRA_CRC: u8 = 184u8;
4644    const ENCODED_LEN: usize = 38usize;
4645    fn deser(
4646        _version: MavlinkVersion,
4647        __input: &[u8],
4648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4649        let avail_len = __input.len();
4650        let mut payload_buf = [0; Self::ENCODED_LEN];
4651        let mut buf = if avail_len < Self::ENCODED_LEN {
4652            payload_buf[0..avail_len].copy_from_slice(__input);
4653            Bytes::new(&payload_buf)
4654        } else {
4655            Bytes::new(__input)
4656        };
4657        let mut __struct = Self::default();
4658        __struct.ICAO_address = buf.get_u32_le();
4659        __struct.lat = buf.get_i32_le();
4660        __struct.lon = buf.get_i32_le();
4661        __struct.altitude = buf.get_i32_le();
4662        __struct.heading = buf.get_u16_le();
4663        __struct.hor_velocity = buf.get_u16_le();
4664        __struct.ver_velocity = buf.get_i16_le();
4665        let tmp = buf.get_u16_le();
4666        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4667            ::mavlink_core::error::ParserError::InvalidFlag {
4668                flag_type: "AdsbFlags",
4669                value: tmp as u32,
4670            },
4671        )?;
4672        __struct.squawk = buf.get_u16_le();
4673        let tmp = buf.get_u8();
4674        __struct.altitude_type =
4675            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4676                enum_type: "AdsbAltitudeType",
4677                value: tmp as u32,
4678            })?;
4679        for v in &mut __struct.callsign {
4680            let val = buf.get_u8();
4681            *v = val;
4682        }
4683        let tmp = buf.get_u8();
4684        __struct.emitter_type =
4685            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4686                enum_type: "AdsbEmitterType",
4687                value: tmp as u32,
4688            })?;
4689        __struct.tslc = buf.get_u8();
4690        Ok(__struct)
4691    }
4692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4693        let mut __tmp = BytesMut::new(bytes);
4694        #[allow(clippy::absurd_extreme_comparisons)]
4695        #[allow(unused_comparisons)]
4696        if __tmp.remaining() < Self::ENCODED_LEN {
4697            panic!(
4698                "buffer is too small (need {} bytes, but got {})",
4699                Self::ENCODED_LEN,
4700                __tmp.remaining(),
4701            )
4702        }
4703        __tmp.put_u32_le(self.ICAO_address);
4704        __tmp.put_i32_le(self.lat);
4705        __tmp.put_i32_le(self.lon);
4706        __tmp.put_i32_le(self.altitude);
4707        __tmp.put_u16_le(self.heading);
4708        __tmp.put_u16_le(self.hor_velocity);
4709        __tmp.put_i16_le(self.ver_velocity);
4710        __tmp.put_u16_le(self.flags.bits());
4711        __tmp.put_u16_le(self.squawk);
4712        __tmp.put_u8(self.altitude_type as u8);
4713        for val in &self.callsign {
4714            __tmp.put_u8(*val);
4715        }
4716        __tmp.put_u8(self.emitter_type as u8);
4717        __tmp.put_u8(self.tslc);
4718        if matches!(version, MavlinkVersion::V2) {
4719            let len = __tmp.len();
4720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4721        } else {
4722            __tmp.len()
4723        }
4724    }
4725}
4726#[doc = "id: 64"]
4727#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
4728#[derive(Debug, Clone, PartialEq)]
4729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4731pub struct LOCAL_POSITION_NED_COV_DATA {
4732    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4733    pub time_usec: u64,
4734    #[doc = "X Position"]
4735    pub x: f32,
4736    #[doc = "Y Position"]
4737    pub y: f32,
4738    #[doc = "Z Position"]
4739    pub z: f32,
4740    #[doc = "X Speed"]
4741    pub vx: f32,
4742    #[doc = "Y Speed"]
4743    pub vy: f32,
4744    #[doc = "Z Speed"]
4745    pub vz: f32,
4746    #[doc = "X Acceleration"]
4747    pub ax: f32,
4748    #[doc = "Y Acceleration"]
4749    pub ay: f32,
4750    #[doc = "Z Acceleration"]
4751    pub az: f32,
4752    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
4753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4754    pub covariance: [f32; 45],
4755    #[doc = "Class id of the estimator this estimate originated from."]
4756    pub estimator_type: MavEstimatorType,
4757}
4758impl LOCAL_POSITION_NED_COV_DATA {
4759    pub const ENCODED_LEN: usize = 225usize;
4760    pub const DEFAULT: Self = Self {
4761        time_usec: 0_u64,
4762        x: 0.0_f32,
4763        y: 0.0_f32,
4764        z: 0.0_f32,
4765        vx: 0.0_f32,
4766        vy: 0.0_f32,
4767        vz: 0.0_f32,
4768        ax: 0.0_f32,
4769        ay: 0.0_f32,
4770        az: 0.0_f32,
4771        covariance: [0.0_f32; 45usize],
4772        estimator_type: MavEstimatorType::DEFAULT,
4773    };
4774    #[cfg(feature = "arbitrary")]
4775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4776        use arbitrary::{Arbitrary, Unstructured};
4777        let mut buf = [0u8; 1024];
4778        rng.fill_bytes(&mut buf);
4779        let mut unstructured = Unstructured::new(&buf);
4780        Self::arbitrary(&mut unstructured).unwrap_or_default()
4781    }
4782}
4783impl Default for LOCAL_POSITION_NED_COV_DATA {
4784    fn default() -> Self {
4785        Self::DEFAULT.clone()
4786    }
4787}
4788impl MessageData for LOCAL_POSITION_NED_COV_DATA {
4789    type Message = MavMessage;
4790    const ID: u32 = 64u32;
4791    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
4792    const EXTRA_CRC: u8 = 191u8;
4793    const ENCODED_LEN: usize = 225usize;
4794    fn deser(
4795        _version: MavlinkVersion,
4796        __input: &[u8],
4797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4798        let avail_len = __input.len();
4799        let mut payload_buf = [0; Self::ENCODED_LEN];
4800        let mut buf = if avail_len < Self::ENCODED_LEN {
4801            payload_buf[0..avail_len].copy_from_slice(__input);
4802            Bytes::new(&payload_buf)
4803        } else {
4804            Bytes::new(__input)
4805        };
4806        let mut __struct = Self::default();
4807        __struct.time_usec = buf.get_u64_le();
4808        __struct.x = buf.get_f32_le();
4809        __struct.y = buf.get_f32_le();
4810        __struct.z = buf.get_f32_le();
4811        __struct.vx = buf.get_f32_le();
4812        __struct.vy = buf.get_f32_le();
4813        __struct.vz = buf.get_f32_le();
4814        __struct.ax = buf.get_f32_le();
4815        __struct.ay = buf.get_f32_le();
4816        __struct.az = buf.get_f32_le();
4817        for v in &mut __struct.covariance {
4818            let val = buf.get_f32_le();
4819            *v = val;
4820        }
4821        let tmp = buf.get_u8();
4822        __struct.estimator_type =
4823            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4824                enum_type: "MavEstimatorType",
4825                value: tmp as u32,
4826            })?;
4827        Ok(__struct)
4828    }
4829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4830        let mut __tmp = BytesMut::new(bytes);
4831        #[allow(clippy::absurd_extreme_comparisons)]
4832        #[allow(unused_comparisons)]
4833        if __tmp.remaining() < Self::ENCODED_LEN {
4834            panic!(
4835                "buffer is too small (need {} bytes, but got {})",
4836                Self::ENCODED_LEN,
4837                __tmp.remaining(),
4838            )
4839        }
4840        __tmp.put_u64_le(self.time_usec);
4841        __tmp.put_f32_le(self.x);
4842        __tmp.put_f32_le(self.y);
4843        __tmp.put_f32_le(self.z);
4844        __tmp.put_f32_le(self.vx);
4845        __tmp.put_f32_le(self.vy);
4846        __tmp.put_f32_le(self.vz);
4847        __tmp.put_f32_le(self.ax);
4848        __tmp.put_f32_le(self.ay);
4849        __tmp.put_f32_le(self.az);
4850        for val in &self.covariance {
4851            __tmp.put_f32_le(*val);
4852        }
4853        __tmp.put_u8(self.estimator_type as u8);
4854        if matches!(version, MavlinkVersion::V2) {
4855            let len = __tmp.len();
4856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4857        } else {
4858            __tmp.len()
4859        }
4860    }
4861}
4862#[doc = "id: 102"]
4863#[doc = "Local position/attitude estimate from a vision source."]
4864#[derive(Debug, Clone, PartialEq)]
4865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4867pub struct VISION_POSITION_ESTIMATE_DATA {
4868    #[doc = "Timestamp (UNIX time or time since system boot)"]
4869    pub usec: u64,
4870    #[doc = "Local X position"]
4871    pub x: f32,
4872    #[doc = "Local Y position"]
4873    pub y: f32,
4874    #[doc = "Local Z position"]
4875    pub z: f32,
4876    #[doc = "Roll angle"]
4877    pub roll: f32,
4878    #[doc = "Pitch angle"]
4879    pub pitch: f32,
4880    #[doc = "Yaw angle"]
4881    pub yaw: f32,
4882    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
4883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4885    pub covariance: [f32; 21],
4886    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
4887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4888    pub reset_counter: u8,
4889}
4890impl VISION_POSITION_ESTIMATE_DATA {
4891    pub const ENCODED_LEN: usize = 117usize;
4892    pub const DEFAULT: Self = Self {
4893        usec: 0_u64,
4894        x: 0.0_f32,
4895        y: 0.0_f32,
4896        z: 0.0_f32,
4897        roll: 0.0_f32,
4898        pitch: 0.0_f32,
4899        yaw: 0.0_f32,
4900        covariance: [0.0_f32; 21usize],
4901        reset_counter: 0_u8,
4902    };
4903    #[cfg(feature = "arbitrary")]
4904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4905        use arbitrary::{Arbitrary, Unstructured};
4906        let mut buf = [0u8; 1024];
4907        rng.fill_bytes(&mut buf);
4908        let mut unstructured = Unstructured::new(&buf);
4909        Self::arbitrary(&mut unstructured).unwrap_or_default()
4910    }
4911}
4912impl Default for VISION_POSITION_ESTIMATE_DATA {
4913    fn default() -> Self {
4914        Self::DEFAULT.clone()
4915    }
4916}
4917impl MessageData for VISION_POSITION_ESTIMATE_DATA {
4918    type Message = MavMessage;
4919    const ID: u32 = 102u32;
4920    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
4921    const EXTRA_CRC: u8 = 158u8;
4922    const ENCODED_LEN: usize = 117usize;
4923    fn deser(
4924        _version: MavlinkVersion,
4925        __input: &[u8],
4926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4927        let avail_len = __input.len();
4928        let mut payload_buf = [0; Self::ENCODED_LEN];
4929        let mut buf = if avail_len < Self::ENCODED_LEN {
4930            payload_buf[0..avail_len].copy_from_slice(__input);
4931            Bytes::new(&payload_buf)
4932        } else {
4933            Bytes::new(__input)
4934        };
4935        let mut __struct = Self::default();
4936        __struct.usec = buf.get_u64_le();
4937        __struct.x = buf.get_f32_le();
4938        __struct.y = buf.get_f32_le();
4939        __struct.z = buf.get_f32_le();
4940        __struct.roll = buf.get_f32_le();
4941        __struct.pitch = buf.get_f32_le();
4942        __struct.yaw = buf.get_f32_le();
4943        for v in &mut __struct.covariance {
4944            let val = buf.get_f32_le();
4945            *v = val;
4946        }
4947        __struct.reset_counter = buf.get_u8();
4948        Ok(__struct)
4949    }
4950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4951        let mut __tmp = BytesMut::new(bytes);
4952        #[allow(clippy::absurd_extreme_comparisons)]
4953        #[allow(unused_comparisons)]
4954        if __tmp.remaining() < Self::ENCODED_LEN {
4955            panic!(
4956                "buffer is too small (need {} bytes, but got {})",
4957                Self::ENCODED_LEN,
4958                __tmp.remaining(),
4959            )
4960        }
4961        __tmp.put_u64_le(self.usec);
4962        __tmp.put_f32_le(self.x);
4963        __tmp.put_f32_le(self.y);
4964        __tmp.put_f32_le(self.z);
4965        __tmp.put_f32_le(self.roll);
4966        __tmp.put_f32_le(self.pitch);
4967        __tmp.put_f32_le(self.yaw);
4968        for val in &self.covariance {
4969            __tmp.put_f32_le(*val);
4970        }
4971        __tmp.put_u8(self.reset_counter);
4972        if matches!(version, MavlinkVersion::V2) {
4973            let len = __tmp.len();
4974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4975        } else {
4976            __tmp.len()
4977        }
4978    }
4979}
4980#[doc = "id: 258"]
4981#[doc = "Control vehicle tone generation (buzzer)."]
4982#[derive(Debug, Clone, PartialEq)]
4983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4985pub struct PLAY_TUNE_DATA {
4986    #[doc = "System ID"]
4987    pub target_system: u8,
4988    #[doc = "Component ID"]
4989    pub target_component: u8,
4990    #[doc = "tune in board specific format"]
4991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4992    pub tune: [u8; 30],
4993    #[doc = "tune extension (appended to tune)"]
4994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4996    pub tune2: [u8; 200],
4997}
4998impl PLAY_TUNE_DATA {
4999    pub const ENCODED_LEN: usize = 232usize;
5000    pub const DEFAULT: Self = Self {
5001        target_system: 0_u8,
5002        target_component: 0_u8,
5003        tune: [0_u8; 30usize],
5004        tune2: [0_u8; 200usize],
5005    };
5006    #[cfg(feature = "arbitrary")]
5007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5008        use arbitrary::{Arbitrary, Unstructured};
5009        let mut buf = [0u8; 1024];
5010        rng.fill_bytes(&mut buf);
5011        let mut unstructured = Unstructured::new(&buf);
5012        Self::arbitrary(&mut unstructured).unwrap_or_default()
5013    }
5014}
5015impl Default for PLAY_TUNE_DATA {
5016    fn default() -> Self {
5017        Self::DEFAULT.clone()
5018    }
5019}
5020impl MessageData for PLAY_TUNE_DATA {
5021    type Message = MavMessage;
5022    const ID: u32 = 258u32;
5023    const NAME: &'static str = "PLAY_TUNE";
5024    const EXTRA_CRC: u8 = 187u8;
5025    const ENCODED_LEN: usize = 232usize;
5026    fn deser(
5027        _version: MavlinkVersion,
5028        __input: &[u8],
5029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5030        let avail_len = __input.len();
5031        let mut payload_buf = [0; Self::ENCODED_LEN];
5032        let mut buf = if avail_len < Self::ENCODED_LEN {
5033            payload_buf[0..avail_len].copy_from_slice(__input);
5034            Bytes::new(&payload_buf)
5035        } else {
5036            Bytes::new(__input)
5037        };
5038        let mut __struct = Self::default();
5039        __struct.target_system = buf.get_u8();
5040        __struct.target_component = buf.get_u8();
5041        for v in &mut __struct.tune {
5042            let val = buf.get_u8();
5043            *v = val;
5044        }
5045        for v in &mut __struct.tune2 {
5046            let val = buf.get_u8();
5047            *v = val;
5048        }
5049        Ok(__struct)
5050    }
5051    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5052        let mut __tmp = BytesMut::new(bytes);
5053        #[allow(clippy::absurd_extreme_comparisons)]
5054        #[allow(unused_comparisons)]
5055        if __tmp.remaining() < Self::ENCODED_LEN {
5056            panic!(
5057                "buffer is too small (need {} bytes, but got {})",
5058                Self::ENCODED_LEN,
5059                __tmp.remaining(),
5060            )
5061        }
5062        __tmp.put_u8(self.target_system);
5063        __tmp.put_u8(self.target_component);
5064        for val in &self.tune {
5065            __tmp.put_u8(*val);
5066        }
5067        for val in &self.tune2 {
5068            __tmp.put_u8(*val);
5069        }
5070        if matches!(version, MavlinkVersion::V2) {
5071            let len = __tmp.len();
5072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5073        } else {
5074            __tmp.len()
5075        }
5076    }
5077}
5078#[doc = "id: 244"]
5079#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
5080#[derive(Debug, Clone, PartialEq)]
5081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5083pub struct MESSAGE_INTERVAL_DATA {
5084    #[doc = "0 indicates the interval at which it is sent."]
5085    pub interval_us: i32,
5086    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
5087    pub message_id: u16,
5088}
5089impl MESSAGE_INTERVAL_DATA {
5090    pub const ENCODED_LEN: usize = 6usize;
5091    pub const DEFAULT: Self = Self {
5092        interval_us: 0_i32,
5093        message_id: 0_u16,
5094    };
5095    #[cfg(feature = "arbitrary")]
5096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5097        use arbitrary::{Arbitrary, Unstructured};
5098        let mut buf = [0u8; 1024];
5099        rng.fill_bytes(&mut buf);
5100        let mut unstructured = Unstructured::new(&buf);
5101        Self::arbitrary(&mut unstructured).unwrap_or_default()
5102    }
5103}
5104impl Default for MESSAGE_INTERVAL_DATA {
5105    fn default() -> Self {
5106        Self::DEFAULT.clone()
5107    }
5108}
5109impl MessageData for MESSAGE_INTERVAL_DATA {
5110    type Message = MavMessage;
5111    const ID: u32 = 244u32;
5112    const NAME: &'static str = "MESSAGE_INTERVAL";
5113    const EXTRA_CRC: u8 = 95u8;
5114    const ENCODED_LEN: usize = 6usize;
5115    fn deser(
5116        _version: MavlinkVersion,
5117        __input: &[u8],
5118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5119        let avail_len = __input.len();
5120        let mut payload_buf = [0; Self::ENCODED_LEN];
5121        let mut buf = if avail_len < Self::ENCODED_LEN {
5122            payload_buf[0..avail_len].copy_from_slice(__input);
5123            Bytes::new(&payload_buf)
5124        } else {
5125            Bytes::new(__input)
5126        };
5127        let mut __struct = Self::default();
5128        __struct.interval_us = buf.get_i32_le();
5129        __struct.message_id = buf.get_u16_le();
5130        Ok(__struct)
5131    }
5132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5133        let mut __tmp = BytesMut::new(bytes);
5134        #[allow(clippy::absurd_extreme_comparisons)]
5135        #[allow(unused_comparisons)]
5136        if __tmp.remaining() < Self::ENCODED_LEN {
5137            panic!(
5138                "buffer is too small (need {} bytes, but got {})",
5139                Self::ENCODED_LEN,
5140                __tmp.remaining(),
5141            )
5142        }
5143        __tmp.put_i32_le(self.interval_us);
5144        __tmp.put_u16_le(self.message_id);
5145        if matches!(version, MavlinkVersion::V2) {
5146            let len = __tmp.len();
5147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5148        } else {
5149            __tmp.len()
5150        }
5151    }
5152}
5153#[doc = "id: 280"]
5154#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
5155#[derive(Debug, Clone, PartialEq)]
5156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5158pub struct GIMBAL_MANAGER_INFORMATION_DATA {
5159    #[doc = "Timestamp (time since system boot)."]
5160    pub time_boot_ms: u32,
5161    #[doc = "Bitmap of gimbal capability flags."]
5162    pub cap_flags: GimbalManagerCapFlags,
5163    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
5164    pub roll_min: f32,
5165    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
5166    pub roll_max: f32,
5167    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
5168    pub pitch_min: f32,
5169    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
5170    pub pitch_max: f32,
5171    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
5172    pub yaw_min: f32,
5173    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
5174    pub yaw_max: f32,
5175    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
5176    pub gimbal_device_id: u8,
5177}
5178impl GIMBAL_MANAGER_INFORMATION_DATA {
5179    pub const ENCODED_LEN: usize = 33usize;
5180    pub const DEFAULT: Self = Self {
5181        time_boot_ms: 0_u32,
5182        cap_flags: GimbalManagerCapFlags::DEFAULT,
5183        roll_min: 0.0_f32,
5184        roll_max: 0.0_f32,
5185        pitch_min: 0.0_f32,
5186        pitch_max: 0.0_f32,
5187        yaw_min: 0.0_f32,
5188        yaw_max: 0.0_f32,
5189        gimbal_device_id: 0_u8,
5190    };
5191    #[cfg(feature = "arbitrary")]
5192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5193        use arbitrary::{Arbitrary, Unstructured};
5194        let mut buf = [0u8; 1024];
5195        rng.fill_bytes(&mut buf);
5196        let mut unstructured = Unstructured::new(&buf);
5197        Self::arbitrary(&mut unstructured).unwrap_or_default()
5198    }
5199}
5200impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
5201    fn default() -> Self {
5202        Self::DEFAULT.clone()
5203    }
5204}
5205impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
5206    type Message = MavMessage;
5207    const ID: u32 = 280u32;
5208    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
5209    const EXTRA_CRC: u8 = 70u8;
5210    const ENCODED_LEN: usize = 33usize;
5211    fn deser(
5212        _version: MavlinkVersion,
5213        __input: &[u8],
5214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5215        let avail_len = __input.len();
5216        let mut payload_buf = [0; Self::ENCODED_LEN];
5217        let mut buf = if avail_len < Self::ENCODED_LEN {
5218            payload_buf[0..avail_len].copy_from_slice(__input);
5219            Bytes::new(&payload_buf)
5220        } else {
5221            Bytes::new(__input)
5222        };
5223        let mut __struct = Self::default();
5224        __struct.time_boot_ms = buf.get_u32_le();
5225        let tmp = buf.get_u32_le();
5226        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
5227            tmp & GimbalManagerCapFlags::all().bits(),
5228        )
5229        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5230            flag_type: "GimbalManagerCapFlags",
5231            value: tmp as u32,
5232        })?;
5233        __struct.roll_min = buf.get_f32_le();
5234        __struct.roll_max = buf.get_f32_le();
5235        __struct.pitch_min = buf.get_f32_le();
5236        __struct.pitch_max = buf.get_f32_le();
5237        __struct.yaw_min = buf.get_f32_le();
5238        __struct.yaw_max = buf.get_f32_le();
5239        __struct.gimbal_device_id = buf.get_u8();
5240        Ok(__struct)
5241    }
5242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5243        let mut __tmp = BytesMut::new(bytes);
5244        #[allow(clippy::absurd_extreme_comparisons)]
5245        #[allow(unused_comparisons)]
5246        if __tmp.remaining() < Self::ENCODED_LEN {
5247            panic!(
5248                "buffer is too small (need {} bytes, but got {})",
5249                Self::ENCODED_LEN,
5250                __tmp.remaining(),
5251            )
5252        }
5253        __tmp.put_u32_le(self.time_boot_ms);
5254        __tmp.put_u32_le(self.cap_flags.bits());
5255        __tmp.put_f32_le(self.roll_min);
5256        __tmp.put_f32_le(self.roll_max);
5257        __tmp.put_f32_le(self.pitch_min);
5258        __tmp.put_f32_le(self.pitch_max);
5259        __tmp.put_f32_le(self.yaw_min);
5260        __tmp.put_f32_le(self.yaw_max);
5261        __tmp.put_u8(self.gimbal_device_id);
5262        if matches!(version, MavlinkVersion::V2) {
5263            let len = __tmp.len();
5264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5265        } else {
5266            __tmp.len()
5267        }
5268    }
5269}
5270#[doc = "id: 250"]
5271#[doc = "To debug something using a named 3D vector."]
5272#[derive(Debug, Clone, PartialEq)]
5273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5275pub struct DEBUG_VECT_DATA {
5276    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5277    pub time_usec: u64,
5278    #[doc = "x"]
5279    pub x: f32,
5280    #[doc = "y"]
5281    pub y: f32,
5282    #[doc = "z"]
5283    pub z: f32,
5284    #[doc = "Name"]
5285    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5286    pub name: [u8; 10],
5287}
5288impl DEBUG_VECT_DATA {
5289    pub const ENCODED_LEN: usize = 30usize;
5290    pub const DEFAULT: Self = Self {
5291        time_usec: 0_u64,
5292        x: 0.0_f32,
5293        y: 0.0_f32,
5294        z: 0.0_f32,
5295        name: [0_u8; 10usize],
5296    };
5297    #[cfg(feature = "arbitrary")]
5298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5299        use arbitrary::{Arbitrary, Unstructured};
5300        let mut buf = [0u8; 1024];
5301        rng.fill_bytes(&mut buf);
5302        let mut unstructured = Unstructured::new(&buf);
5303        Self::arbitrary(&mut unstructured).unwrap_or_default()
5304    }
5305}
5306impl Default for DEBUG_VECT_DATA {
5307    fn default() -> Self {
5308        Self::DEFAULT.clone()
5309    }
5310}
5311impl MessageData for DEBUG_VECT_DATA {
5312    type Message = MavMessage;
5313    const ID: u32 = 250u32;
5314    const NAME: &'static str = "DEBUG_VECT";
5315    const EXTRA_CRC: u8 = 49u8;
5316    const ENCODED_LEN: usize = 30usize;
5317    fn deser(
5318        _version: MavlinkVersion,
5319        __input: &[u8],
5320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5321        let avail_len = __input.len();
5322        let mut payload_buf = [0; Self::ENCODED_LEN];
5323        let mut buf = if avail_len < Self::ENCODED_LEN {
5324            payload_buf[0..avail_len].copy_from_slice(__input);
5325            Bytes::new(&payload_buf)
5326        } else {
5327            Bytes::new(__input)
5328        };
5329        let mut __struct = Self::default();
5330        __struct.time_usec = buf.get_u64_le();
5331        __struct.x = buf.get_f32_le();
5332        __struct.y = buf.get_f32_le();
5333        __struct.z = buf.get_f32_le();
5334        for v in &mut __struct.name {
5335            let val = buf.get_u8();
5336            *v = val;
5337        }
5338        Ok(__struct)
5339    }
5340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5341        let mut __tmp = BytesMut::new(bytes);
5342        #[allow(clippy::absurd_extreme_comparisons)]
5343        #[allow(unused_comparisons)]
5344        if __tmp.remaining() < Self::ENCODED_LEN {
5345            panic!(
5346                "buffer is too small (need {} bytes, but got {})",
5347                Self::ENCODED_LEN,
5348                __tmp.remaining(),
5349            )
5350        }
5351        __tmp.put_u64_le(self.time_usec);
5352        __tmp.put_f32_le(self.x);
5353        __tmp.put_f32_le(self.y);
5354        __tmp.put_f32_le(self.z);
5355        for val in &self.name {
5356            __tmp.put_u8(*val);
5357        }
5358        if matches!(version, MavlinkVersion::V2) {
5359            let len = __tmp.len();
5360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5361        } else {
5362            __tmp.len()
5363        }
5364    }
5365}
5366#[doc = "id: 93"]
5367#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
5368#[derive(Debug, Clone, PartialEq)]
5369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5371pub struct HIL_ACTUATOR_CONTROLS_DATA {
5372    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5373    pub time_usec: u64,
5374    #[doc = "Flags bitmask."]
5375    pub flags: HilActuatorControlsFlags,
5376    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
5377    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5378    pub controls: [f32; 16],
5379    #[doc = "System mode. Includes arming state."]
5380    pub mode: MavModeFlag,
5381}
5382impl HIL_ACTUATOR_CONTROLS_DATA {
5383    pub const ENCODED_LEN: usize = 81usize;
5384    pub const DEFAULT: Self = Self {
5385        time_usec: 0_u64,
5386        flags: HilActuatorControlsFlags::DEFAULT,
5387        controls: [0.0_f32; 16usize],
5388        mode: MavModeFlag::DEFAULT,
5389    };
5390    #[cfg(feature = "arbitrary")]
5391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5392        use arbitrary::{Arbitrary, Unstructured};
5393        let mut buf = [0u8; 1024];
5394        rng.fill_bytes(&mut buf);
5395        let mut unstructured = Unstructured::new(&buf);
5396        Self::arbitrary(&mut unstructured).unwrap_or_default()
5397    }
5398}
5399impl Default for HIL_ACTUATOR_CONTROLS_DATA {
5400    fn default() -> Self {
5401        Self::DEFAULT.clone()
5402    }
5403}
5404impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
5405    type Message = MavMessage;
5406    const ID: u32 = 93u32;
5407    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
5408    const EXTRA_CRC: u8 = 47u8;
5409    const ENCODED_LEN: usize = 81usize;
5410    fn deser(
5411        _version: MavlinkVersion,
5412        __input: &[u8],
5413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5414        let avail_len = __input.len();
5415        let mut payload_buf = [0; Self::ENCODED_LEN];
5416        let mut buf = if avail_len < Self::ENCODED_LEN {
5417            payload_buf[0..avail_len].copy_from_slice(__input);
5418            Bytes::new(&payload_buf)
5419        } else {
5420            Bytes::new(__input)
5421        };
5422        let mut __struct = Self::default();
5423        __struct.time_usec = buf.get_u64_le();
5424        let tmp = buf.get_u64_le();
5425        __struct.flags =
5426            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
5427                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5428                    flag_type: "HilActuatorControlsFlags",
5429                    value: tmp as u32,
5430                })?;
5431        for v in &mut __struct.controls {
5432            let val = buf.get_f32_le();
5433            *v = val;
5434        }
5435        let tmp = buf.get_u8();
5436        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
5437            ::mavlink_core::error::ParserError::InvalidFlag {
5438                flag_type: "MavModeFlag",
5439                value: tmp as u32,
5440            },
5441        )?;
5442        Ok(__struct)
5443    }
5444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5445        let mut __tmp = BytesMut::new(bytes);
5446        #[allow(clippy::absurd_extreme_comparisons)]
5447        #[allow(unused_comparisons)]
5448        if __tmp.remaining() < Self::ENCODED_LEN {
5449            panic!(
5450                "buffer is too small (need {} bytes, but got {})",
5451                Self::ENCODED_LEN,
5452                __tmp.remaining(),
5453            )
5454        }
5455        __tmp.put_u64_le(self.time_usec);
5456        __tmp.put_u64_le(self.flags.bits());
5457        for val in &self.controls {
5458            __tmp.put_f32_le(*val);
5459        }
5460        __tmp.put_u8(self.mode.bits());
5461        if matches!(version, MavlinkVersion::V2) {
5462            let len = __tmp.len();
5463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5464        } else {
5465            __tmp.len()
5466        }
5467    }
5468}
5469#[doc = "id: 8003"]
5470#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
5471#[derive(Debug, Clone, PartialEq)]
5472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5474pub struct SENS_MPPT_DATA {
5475    #[doc = "MPPT last timestamp"]
5476    pub mppt_timestamp: u64,
5477    #[doc = "MPPT1 voltage"]
5478    pub mppt1_volt: f32,
5479    #[doc = "MPPT1 current"]
5480    pub mppt1_amp: f32,
5481    #[doc = "MPPT2 voltage"]
5482    pub mppt2_volt: f32,
5483    #[doc = "MPPT2 current"]
5484    pub mppt2_amp: f32,
5485    #[doc = "MPPT3 voltage"]
5486    pub mppt3_volt: f32,
5487    #[doc = "MPPT3 current"]
5488    pub mppt3_amp: f32,
5489    #[doc = "MPPT1 pwm"]
5490    pub mppt1_pwm: u16,
5491    #[doc = "MPPT2 pwm"]
5492    pub mppt2_pwm: u16,
5493    #[doc = "MPPT3 pwm"]
5494    pub mppt3_pwm: u16,
5495    #[doc = "MPPT1 status"]
5496    pub mppt1_status: u8,
5497    #[doc = "MPPT2 status"]
5498    pub mppt2_status: u8,
5499    #[doc = "MPPT3 status"]
5500    pub mppt3_status: u8,
5501}
5502impl SENS_MPPT_DATA {
5503    pub const ENCODED_LEN: usize = 41usize;
5504    pub const DEFAULT: Self = Self {
5505        mppt_timestamp: 0_u64,
5506        mppt1_volt: 0.0_f32,
5507        mppt1_amp: 0.0_f32,
5508        mppt2_volt: 0.0_f32,
5509        mppt2_amp: 0.0_f32,
5510        mppt3_volt: 0.0_f32,
5511        mppt3_amp: 0.0_f32,
5512        mppt1_pwm: 0_u16,
5513        mppt2_pwm: 0_u16,
5514        mppt3_pwm: 0_u16,
5515        mppt1_status: 0_u8,
5516        mppt2_status: 0_u8,
5517        mppt3_status: 0_u8,
5518    };
5519    #[cfg(feature = "arbitrary")]
5520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5521        use arbitrary::{Arbitrary, Unstructured};
5522        let mut buf = [0u8; 1024];
5523        rng.fill_bytes(&mut buf);
5524        let mut unstructured = Unstructured::new(&buf);
5525        Self::arbitrary(&mut unstructured).unwrap_or_default()
5526    }
5527}
5528impl Default for SENS_MPPT_DATA {
5529    fn default() -> Self {
5530        Self::DEFAULT.clone()
5531    }
5532}
5533impl MessageData for SENS_MPPT_DATA {
5534    type Message = MavMessage;
5535    const ID: u32 = 8003u32;
5536    const NAME: &'static str = "SENS_MPPT";
5537    const EXTRA_CRC: u8 = 231u8;
5538    const ENCODED_LEN: usize = 41usize;
5539    fn deser(
5540        _version: MavlinkVersion,
5541        __input: &[u8],
5542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5543        let avail_len = __input.len();
5544        let mut payload_buf = [0; Self::ENCODED_LEN];
5545        let mut buf = if avail_len < Self::ENCODED_LEN {
5546            payload_buf[0..avail_len].copy_from_slice(__input);
5547            Bytes::new(&payload_buf)
5548        } else {
5549            Bytes::new(__input)
5550        };
5551        let mut __struct = Self::default();
5552        __struct.mppt_timestamp = buf.get_u64_le();
5553        __struct.mppt1_volt = buf.get_f32_le();
5554        __struct.mppt1_amp = buf.get_f32_le();
5555        __struct.mppt2_volt = buf.get_f32_le();
5556        __struct.mppt2_amp = buf.get_f32_le();
5557        __struct.mppt3_volt = buf.get_f32_le();
5558        __struct.mppt3_amp = buf.get_f32_le();
5559        __struct.mppt1_pwm = buf.get_u16_le();
5560        __struct.mppt2_pwm = buf.get_u16_le();
5561        __struct.mppt3_pwm = buf.get_u16_le();
5562        __struct.mppt1_status = buf.get_u8();
5563        __struct.mppt2_status = buf.get_u8();
5564        __struct.mppt3_status = buf.get_u8();
5565        Ok(__struct)
5566    }
5567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5568        let mut __tmp = BytesMut::new(bytes);
5569        #[allow(clippy::absurd_extreme_comparisons)]
5570        #[allow(unused_comparisons)]
5571        if __tmp.remaining() < Self::ENCODED_LEN {
5572            panic!(
5573                "buffer is too small (need {} bytes, but got {})",
5574                Self::ENCODED_LEN,
5575                __tmp.remaining(),
5576            )
5577        }
5578        __tmp.put_u64_le(self.mppt_timestamp);
5579        __tmp.put_f32_le(self.mppt1_volt);
5580        __tmp.put_f32_le(self.mppt1_amp);
5581        __tmp.put_f32_le(self.mppt2_volt);
5582        __tmp.put_f32_le(self.mppt2_amp);
5583        __tmp.put_f32_le(self.mppt3_volt);
5584        __tmp.put_f32_le(self.mppt3_amp);
5585        __tmp.put_u16_le(self.mppt1_pwm);
5586        __tmp.put_u16_le(self.mppt2_pwm);
5587        __tmp.put_u16_le(self.mppt3_pwm);
5588        __tmp.put_u8(self.mppt1_status);
5589        __tmp.put_u8(self.mppt2_status);
5590        __tmp.put_u8(self.mppt3_status);
5591        if matches!(version, MavlinkVersion::V2) {
5592            let len = __tmp.len();
5593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5594        } else {
5595            __tmp.len()
5596        }
5597    }
5598}
5599#[doc = "id: 21"]
5600#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
5601#[derive(Debug, Clone, PartialEq)]
5602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5604pub struct PARAM_REQUEST_LIST_DATA {
5605    #[doc = "System ID"]
5606    pub target_system: u8,
5607    #[doc = "Component ID"]
5608    pub target_component: u8,
5609}
5610impl PARAM_REQUEST_LIST_DATA {
5611    pub const ENCODED_LEN: usize = 2usize;
5612    pub const DEFAULT: Self = Self {
5613        target_system: 0_u8,
5614        target_component: 0_u8,
5615    };
5616    #[cfg(feature = "arbitrary")]
5617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5618        use arbitrary::{Arbitrary, Unstructured};
5619        let mut buf = [0u8; 1024];
5620        rng.fill_bytes(&mut buf);
5621        let mut unstructured = Unstructured::new(&buf);
5622        Self::arbitrary(&mut unstructured).unwrap_or_default()
5623    }
5624}
5625impl Default for PARAM_REQUEST_LIST_DATA {
5626    fn default() -> Self {
5627        Self::DEFAULT.clone()
5628    }
5629}
5630impl MessageData for PARAM_REQUEST_LIST_DATA {
5631    type Message = MavMessage;
5632    const ID: u32 = 21u32;
5633    const NAME: &'static str = "PARAM_REQUEST_LIST";
5634    const EXTRA_CRC: u8 = 159u8;
5635    const ENCODED_LEN: usize = 2usize;
5636    fn deser(
5637        _version: MavlinkVersion,
5638        __input: &[u8],
5639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5640        let avail_len = __input.len();
5641        let mut payload_buf = [0; Self::ENCODED_LEN];
5642        let mut buf = if avail_len < Self::ENCODED_LEN {
5643            payload_buf[0..avail_len].copy_from_slice(__input);
5644            Bytes::new(&payload_buf)
5645        } else {
5646            Bytes::new(__input)
5647        };
5648        let mut __struct = Self::default();
5649        __struct.target_system = buf.get_u8();
5650        __struct.target_component = buf.get_u8();
5651        Ok(__struct)
5652    }
5653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5654        let mut __tmp = BytesMut::new(bytes);
5655        #[allow(clippy::absurd_extreme_comparisons)]
5656        #[allow(unused_comparisons)]
5657        if __tmp.remaining() < Self::ENCODED_LEN {
5658            panic!(
5659                "buffer is too small (need {} bytes, but got {})",
5660                Self::ENCODED_LEN,
5661                __tmp.remaining(),
5662            )
5663        }
5664        __tmp.put_u8(self.target_system);
5665        __tmp.put_u8(self.target_component);
5666        if matches!(version, MavlinkVersion::V2) {
5667            let len = __tmp.len();
5668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5669        } else {
5670            __tmp.len()
5671        }
5672    }
5673}
5674#[doc = "id: 235"]
5675#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
5676#[derive(Debug, Clone, PartialEq)]
5677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5679pub struct HIGH_LATENCY2_DATA {
5680    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
5681    pub timestamp: u32,
5682    #[doc = "Latitude"]
5683    pub latitude: i32,
5684    #[doc = "Longitude"]
5685    pub longitude: i32,
5686    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
5687    pub custom_mode: u16,
5688    #[doc = "Altitude above mean sea level"]
5689    pub altitude: i16,
5690    #[doc = "Altitude setpoint"]
5691    pub target_altitude: i16,
5692    #[doc = "Distance to target waypoint or position"]
5693    pub target_distance: u16,
5694    #[doc = "Current waypoint number"]
5695    pub wp_num: u16,
5696    #[doc = "Bitmap of failure flags."]
5697    pub failure_flags: HlFailureFlag,
5698    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
5699    pub mavtype: MavType,
5700    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
5701    pub autopilot: MavAutopilot,
5702    #[doc = "Heading"]
5703    pub heading: u8,
5704    #[doc = "Heading setpoint"]
5705    pub target_heading: u8,
5706    #[doc = "Throttle"]
5707    pub throttle: u8,
5708    #[doc = "Airspeed"]
5709    pub airspeed: u8,
5710    #[doc = "Airspeed setpoint"]
5711    pub airspeed_sp: u8,
5712    #[doc = "Groundspeed"]
5713    pub groundspeed: u8,
5714    #[doc = "Windspeed"]
5715    pub windspeed: u8,
5716    #[doc = "Wind heading"]
5717    pub wind_heading: u8,
5718    #[doc = "Maximum error horizontal position since last message"]
5719    pub eph: u8,
5720    #[doc = "Maximum error vertical position since last message"]
5721    pub epv: u8,
5722    #[doc = "Air temperature"]
5723    pub temperature_air: i8,
5724    #[doc = "Maximum climb rate magnitude since last message"]
5725    pub climb_rate: i8,
5726    #[doc = "Battery level (-1 if field not provided)."]
5727    pub battery: i8,
5728    #[doc = "Field for custom payload."]
5729    pub custom0: i8,
5730    #[doc = "Field for custom payload."]
5731    pub custom1: i8,
5732    #[doc = "Field for custom payload."]
5733    pub custom2: i8,
5734}
5735impl HIGH_LATENCY2_DATA {
5736    pub const ENCODED_LEN: usize = 42usize;
5737    pub const DEFAULT: Self = Self {
5738        timestamp: 0_u32,
5739        latitude: 0_i32,
5740        longitude: 0_i32,
5741        custom_mode: 0_u16,
5742        altitude: 0_i16,
5743        target_altitude: 0_i16,
5744        target_distance: 0_u16,
5745        wp_num: 0_u16,
5746        failure_flags: HlFailureFlag::DEFAULT,
5747        mavtype: MavType::DEFAULT,
5748        autopilot: MavAutopilot::DEFAULT,
5749        heading: 0_u8,
5750        target_heading: 0_u8,
5751        throttle: 0_u8,
5752        airspeed: 0_u8,
5753        airspeed_sp: 0_u8,
5754        groundspeed: 0_u8,
5755        windspeed: 0_u8,
5756        wind_heading: 0_u8,
5757        eph: 0_u8,
5758        epv: 0_u8,
5759        temperature_air: 0_i8,
5760        climb_rate: 0_i8,
5761        battery: 0_i8,
5762        custom0: 0_i8,
5763        custom1: 0_i8,
5764        custom2: 0_i8,
5765    };
5766    #[cfg(feature = "arbitrary")]
5767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5768        use arbitrary::{Arbitrary, Unstructured};
5769        let mut buf = [0u8; 1024];
5770        rng.fill_bytes(&mut buf);
5771        let mut unstructured = Unstructured::new(&buf);
5772        Self::arbitrary(&mut unstructured).unwrap_or_default()
5773    }
5774}
5775impl Default for HIGH_LATENCY2_DATA {
5776    fn default() -> Self {
5777        Self::DEFAULT.clone()
5778    }
5779}
5780impl MessageData for HIGH_LATENCY2_DATA {
5781    type Message = MavMessage;
5782    const ID: u32 = 235u32;
5783    const NAME: &'static str = "HIGH_LATENCY2";
5784    const EXTRA_CRC: u8 = 179u8;
5785    const ENCODED_LEN: usize = 42usize;
5786    fn deser(
5787        _version: MavlinkVersion,
5788        __input: &[u8],
5789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5790        let avail_len = __input.len();
5791        let mut payload_buf = [0; Self::ENCODED_LEN];
5792        let mut buf = if avail_len < Self::ENCODED_LEN {
5793            payload_buf[0..avail_len].copy_from_slice(__input);
5794            Bytes::new(&payload_buf)
5795        } else {
5796            Bytes::new(__input)
5797        };
5798        let mut __struct = Self::default();
5799        __struct.timestamp = buf.get_u32_le();
5800        __struct.latitude = buf.get_i32_le();
5801        __struct.longitude = buf.get_i32_le();
5802        __struct.custom_mode = buf.get_u16_le();
5803        __struct.altitude = buf.get_i16_le();
5804        __struct.target_altitude = buf.get_i16_le();
5805        __struct.target_distance = buf.get_u16_le();
5806        __struct.wp_num = buf.get_u16_le();
5807        let tmp = buf.get_u16_le();
5808        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
5809            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5810                flag_type: "HlFailureFlag",
5811                value: tmp as u32,
5812            })?;
5813        let tmp = buf.get_u8();
5814        __struct.mavtype =
5815            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5816                enum_type: "MavType",
5817                value: tmp as u32,
5818            })?;
5819        let tmp = buf.get_u8();
5820        __struct.autopilot =
5821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5822                enum_type: "MavAutopilot",
5823                value: tmp as u32,
5824            })?;
5825        __struct.heading = buf.get_u8();
5826        __struct.target_heading = buf.get_u8();
5827        __struct.throttle = buf.get_u8();
5828        __struct.airspeed = buf.get_u8();
5829        __struct.airspeed_sp = buf.get_u8();
5830        __struct.groundspeed = buf.get_u8();
5831        __struct.windspeed = buf.get_u8();
5832        __struct.wind_heading = buf.get_u8();
5833        __struct.eph = buf.get_u8();
5834        __struct.epv = buf.get_u8();
5835        __struct.temperature_air = buf.get_i8();
5836        __struct.climb_rate = buf.get_i8();
5837        __struct.battery = buf.get_i8();
5838        __struct.custom0 = buf.get_i8();
5839        __struct.custom1 = buf.get_i8();
5840        __struct.custom2 = buf.get_i8();
5841        Ok(__struct)
5842    }
5843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5844        let mut __tmp = BytesMut::new(bytes);
5845        #[allow(clippy::absurd_extreme_comparisons)]
5846        #[allow(unused_comparisons)]
5847        if __tmp.remaining() < Self::ENCODED_LEN {
5848            panic!(
5849                "buffer is too small (need {} bytes, but got {})",
5850                Self::ENCODED_LEN,
5851                __tmp.remaining(),
5852            )
5853        }
5854        __tmp.put_u32_le(self.timestamp);
5855        __tmp.put_i32_le(self.latitude);
5856        __tmp.put_i32_le(self.longitude);
5857        __tmp.put_u16_le(self.custom_mode);
5858        __tmp.put_i16_le(self.altitude);
5859        __tmp.put_i16_le(self.target_altitude);
5860        __tmp.put_u16_le(self.target_distance);
5861        __tmp.put_u16_le(self.wp_num);
5862        __tmp.put_u16_le(self.failure_flags.bits());
5863        __tmp.put_u8(self.mavtype as u8);
5864        __tmp.put_u8(self.autopilot as u8);
5865        __tmp.put_u8(self.heading);
5866        __tmp.put_u8(self.target_heading);
5867        __tmp.put_u8(self.throttle);
5868        __tmp.put_u8(self.airspeed);
5869        __tmp.put_u8(self.airspeed_sp);
5870        __tmp.put_u8(self.groundspeed);
5871        __tmp.put_u8(self.windspeed);
5872        __tmp.put_u8(self.wind_heading);
5873        __tmp.put_u8(self.eph);
5874        __tmp.put_u8(self.epv);
5875        __tmp.put_i8(self.temperature_air);
5876        __tmp.put_i8(self.climb_rate);
5877        __tmp.put_i8(self.battery);
5878        __tmp.put_i8(self.custom0);
5879        __tmp.put_i8(self.custom1);
5880        __tmp.put_i8(self.custom2);
5881        if matches!(version, MavlinkVersion::V2) {
5882            let len = __tmp.len();
5883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5884        } else {
5885            __tmp.len()
5886        }
5887    }
5888}
5889#[doc = "id: 67"]
5890#[doc = "Data stream status information."]
5891#[derive(Debug, Clone, PartialEq)]
5892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5893#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5894pub struct DATA_STREAM_DATA {
5895    #[doc = "The message rate"]
5896    pub message_rate: u16,
5897    #[doc = "The ID of the requested data stream"]
5898    pub stream_id: u8,
5899    #[doc = "1 stream is enabled, 0 stream is stopped."]
5900    pub on_off: u8,
5901}
5902impl DATA_STREAM_DATA {
5903    pub const ENCODED_LEN: usize = 4usize;
5904    pub const DEFAULT: Self = Self {
5905        message_rate: 0_u16,
5906        stream_id: 0_u8,
5907        on_off: 0_u8,
5908    };
5909    #[cfg(feature = "arbitrary")]
5910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5911        use arbitrary::{Arbitrary, Unstructured};
5912        let mut buf = [0u8; 1024];
5913        rng.fill_bytes(&mut buf);
5914        let mut unstructured = Unstructured::new(&buf);
5915        Self::arbitrary(&mut unstructured).unwrap_or_default()
5916    }
5917}
5918impl Default for DATA_STREAM_DATA {
5919    fn default() -> Self {
5920        Self::DEFAULT.clone()
5921    }
5922}
5923impl MessageData for DATA_STREAM_DATA {
5924    type Message = MavMessage;
5925    const ID: u32 = 67u32;
5926    const NAME: &'static str = "DATA_STREAM";
5927    const EXTRA_CRC: u8 = 21u8;
5928    const ENCODED_LEN: usize = 4usize;
5929    fn deser(
5930        _version: MavlinkVersion,
5931        __input: &[u8],
5932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5933        let avail_len = __input.len();
5934        let mut payload_buf = [0; Self::ENCODED_LEN];
5935        let mut buf = if avail_len < Self::ENCODED_LEN {
5936            payload_buf[0..avail_len].copy_from_slice(__input);
5937            Bytes::new(&payload_buf)
5938        } else {
5939            Bytes::new(__input)
5940        };
5941        let mut __struct = Self::default();
5942        __struct.message_rate = buf.get_u16_le();
5943        __struct.stream_id = buf.get_u8();
5944        __struct.on_off = buf.get_u8();
5945        Ok(__struct)
5946    }
5947    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5948        let mut __tmp = BytesMut::new(bytes);
5949        #[allow(clippy::absurd_extreme_comparisons)]
5950        #[allow(unused_comparisons)]
5951        if __tmp.remaining() < Self::ENCODED_LEN {
5952            panic!(
5953                "buffer is too small (need {} bytes, but got {})",
5954                Self::ENCODED_LEN,
5955                __tmp.remaining(),
5956            )
5957        }
5958        __tmp.put_u16_le(self.message_rate);
5959        __tmp.put_u8(self.stream_id);
5960        __tmp.put_u8(self.on_off);
5961        if matches!(version, MavlinkVersion::V2) {
5962            let len = __tmp.len();
5963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5964        } else {
5965            __tmp.len()
5966        }
5967    }
5968}
5969#[doc = "id: 12920"]
5970#[doc = "Temperature and humidity from hygrometer."]
5971#[derive(Debug, Clone, PartialEq)]
5972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5974pub struct HYGROMETER_SENSOR_DATA {
5975    #[doc = "Temperature"]
5976    pub temperature: i16,
5977    #[doc = "Humidity"]
5978    pub humidity: u16,
5979    #[doc = "Hygrometer ID"]
5980    pub id: u8,
5981}
5982impl HYGROMETER_SENSOR_DATA {
5983    pub const ENCODED_LEN: usize = 5usize;
5984    pub const DEFAULT: Self = Self {
5985        temperature: 0_i16,
5986        humidity: 0_u16,
5987        id: 0_u8,
5988    };
5989    #[cfg(feature = "arbitrary")]
5990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5991        use arbitrary::{Arbitrary, Unstructured};
5992        let mut buf = [0u8; 1024];
5993        rng.fill_bytes(&mut buf);
5994        let mut unstructured = Unstructured::new(&buf);
5995        Self::arbitrary(&mut unstructured).unwrap_or_default()
5996    }
5997}
5998impl Default for HYGROMETER_SENSOR_DATA {
5999    fn default() -> Self {
6000        Self::DEFAULT.clone()
6001    }
6002}
6003impl MessageData for HYGROMETER_SENSOR_DATA {
6004    type Message = MavMessage;
6005    const ID: u32 = 12920u32;
6006    const NAME: &'static str = "HYGROMETER_SENSOR";
6007    const EXTRA_CRC: u8 = 20u8;
6008    const ENCODED_LEN: usize = 5usize;
6009    fn deser(
6010        _version: MavlinkVersion,
6011        __input: &[u8],
6012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6013        let avail_len = __input.len();
6014        let mut payload_buf = [0; Self::ENCODED_LEN];
6015        let mut buf = if avail_len < Self::ENCODED_LEN {
6016            payload_buf[0..avail_len].copy_from_slice(__input);
6017            Bytes::new(&payload_buf)
6018        } else {
6019            Bytes::new(__input)
6020        };
6021        let mut __struct = Self::default();
6022        __struct.temperature = buf.get_i16_le();
6023        __struct.humidity = buf.get_u16_le();
6024        __struct.id = buf.get_u8();
6025        Ok(__struct)
6026    }
6027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6028        let mut __tmp = BytesMut::new(bytes);
6029        #[allow(clippy::absurd_extreme_comparisons)]
6030        #[allow(unused_comparisons)]
6031        if __tmp.remaining() < Self::ENCODED_LEN {
6032            panic!(
6033                "buffer is too small (need {} bytes, but got {})",
6034                Self::ENCODED_LEN,
6035                __tmp.remaining(),
6036            )
6037        }
6038        __tmp.put_i16_le(self.temperature);
6039        __tmp.put_u16_le(self.humidity);
6040        __tmp.put_u8(self.id);
6041        if matches!(version, MavlinkVersion::V2) {
6042            let len = __tmp.len();
6043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6044        } else {
6045            __tmp.len()
6046        }
6047    }
6048}
6049#[doc = "id: 334"]
6050#[doc = "Report current used cellular network status."]
6051#[derive(Debug, Clone, PartialEq)]
6052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6054pub struct CELLULAR_STATUS_DATA {
6055    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
6056    pub mcc: u16,
6057    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
6058    pub mnc: u16,
6059    #[doc = "Location area code. If unknown, set to 0"]
6060    pub lac: u16,
6061    #[doc = "Cellular modem status"]
6062    pub status: CellularStatusFlag,
6063    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
6064    pub failure_reason: CellularNetworkFailedReason,
6065    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
6066    pub mavtype: CellularNetworkRadioType,
6067    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
6068    pub quality: u8,
6069}
6070impl CELLULAR_STATUS_DATA {
6071    pub const ENCODED_LEN: usize = 10usize;
6072    pub const DEFAULT: Self = Self {
6073        mcc: 0_u16,
6074        mnc: 0_u16,
6075        lac: 0_u16,
6076        status: CellularStatusFlag::DEFAULT,
6077        failure_reason: CellularNetworkFailedReason::DEFAULT,
6078        mavtype: CellularNetworkRadioType::DEFAULT,
6079        quality: 0_u8,
6080    };
6081    #[cfg(feature = "arbitrary")]
6082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6083        use arbitrary::{Arbitrary, Unstructured};
6084        let mut buf = [0u8; 1024];
6085        rng.fill_bytes(&mut buf);
6086        let mut unstructured = Unstructured::new(&buf);
6087        Self::arbitrary(&mut unstructured).unwrap_or_default()
6088    }
6089}
6090impl Default for CELLULAR_STATUS_DATA {
6091    fn default() -> Self {
6092        Self::DEFAULT.clone()
6093    }
6094}
6095impl MessageData for CELLULAR_STATUS_DATA {
6096    type Message = MavMessage;
6097    const ID: u32 = 334u32;
6098    const NAME: &'static str = "CELLULAR_STATUS";
6099    const EXTRA_CRC: u8 = 72u8;
6100    const ENCODED_LEN: usize = 10usize;
6101    fn deser(
6102        _version: MavlinkVersion,
6103        __input: &[u8],
6104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6105        let avail_len = __input.len();
6106        let mut payload_buf = [0; Self::ENCODED_LEN];
6107        let mut buf = if avail_len < Self::ENCODED_LEN {
6108            payload_buf[0..avail_len].copy_from_slice(__input);
6109            Bytes::new(&payload_buf)
6110        } else {
6111            Bytes::new(__input)
6112        };
6113        let mut __struct = Self::default();
6114        __struct.mcc = buf.get_u16_le();
6115        __struct.mnc = buf.get_u16_le();
6116        __struct.lac = buf.get_u16_le();
6117        let tmp = buf.get_u8();
6118        __struct.status =
6119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6120                enum_type: "CellularStatusFlag",
6121                value: tmp as u32,
6122            })?;
6123        let tmp = buf.get_u8();
6124        __struct.failure_reason =
6125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6126                enum_type: "CellularNetworkFailedReason",
6127                value: tmp as u32,
6128            })?;
6129        let tmp = buf.get_u8();
6130        __struct.mavtype =
6131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6132                enum_type: "CellularNetworkRadioType",
6133                value: tmp as u32,
6134            })?;
6135        __struct.quality = buf.get_u8();
6136        Ok(__struct)
6137    }
6138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6139        let mut __tmp = BytesMut::new(bytes);
6140        #[allow(clippy::absurd_extreme_comparisons)]
6141        #[allow(unused_comparisons)]
6142        if __tmp.remaining() < Self::ENCODED_LEN {
6143            panic!(
6144                "buffer is too small (need {} bytes, but got {})",
6145                Self::ENCODED_LEN,
6146                __tmp.remaining(),
6147            )
6148        }
6149        __tmp.put_u16_le(self.mcc);
6150        __tmp.put_u16_le(self.mnc);
6151        __tmp.put_u16_le(self.lac);
6152        __tmp.put_u8(self.status as u8);
6153        __tmp.put_u8(self.failure_reason as u8);
6154        __tmp.put_u8(self.mavtype as u8);
6155        __tmp.put_u8(self.quality);
6156        if matches!(version, MavlinkVersion::V2) {
6157            let len = __tmp.len();
6158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6159        } else {
6160            __tmp.len()
6161        }
6162    }
6163}
6164#[doc = "id: 45"]
6165#[doc = "Delete all mission items at once."]
6166#[derive(Debug, Clone, PartialEq)]
6167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6169pub struct MISSION_CLEAR_ALL_DATA {
6170    #[doc = "System ID"]
6171    pub target_system: u8,
6172    #[doc = "Component ID"]
6173    pub target_component: u8,
6174    #[doc = "Mission type."]
6175    #[cfg_attr(feature = "serde", serde(default))]
6176    pub mission_type: MavMissionType,
6177}
6178impl MISSION_CLEAR_ALL_DATA {
6179    pub const ENCODED_LEN: usize = 3usize;
6180    pub const DEFAULT: Self = Self {
6181        target_system: 0_u8,
6182        target_component: 0_u8,
6183        mission_type: MavMissionType::DEFAULT,
6184    };
6185    #[cfg(feature = "arbitrary")]
6186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6187        use arbitrary::{Arbitrary, Unstructured};
6188        let mut buf = [0u8; 1024];
6189        rng.fill_bytes(&mut buf);
6190        let mut unstructured = Unstructured::new(&buf);
6191        Self::arbitrary(&mut unstructured).unwrap_or_default()
6192    }
6193}
6194impl Default for MISSION_CLEAR_ALL_DATA {
6195    fn default() -> Self {
6196        Self::DEFAULT.clone()
6197    }
6198}
6199impl MessageData for MISSION_CLEAR_ALL_DATA {
6200    type Message = MavMessage;
6201    const ID: u32 = 45u32;
6202    const NAME: &'static str = "MISSION_CLEAR_ALL";
6203    const EXTRA_CRC: u8 = 232u8;
6204    const ENCODED_LEN: usize = 3usize;
6205    fn deser(
6206        _version: MavlinkVersion,
6207        __input: &[u8],
6208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6209        let avail_len = __input.len();
6210        let mut payload_buf = [0; Self::ENCODED_LEN];
6211        let mut buf = if avail_len < Self::ENCODED_LEN {
6212            payload_buf[0..avail_len].copy_from_slice(__input);
6213            Bytes::new(&payload_buf)
6214        } else {
6215            Bytes::new(__input)
6216        };
6217        let mut __struct = Self::default();
6218        __struct.target_system = buf.get_u8();
6219        __struct.target_component = buf.get_u8();
6220        let tmp = buf.get_u8();
6221        __struct.mission_type =
6222            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6223                enum_type: "MavMissionType",
6224                value: tmp as u32,
6225            })?;
6226        Ok(__struct)
6227    }
6228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6229        let mut __tmp = BytesMut::new(bytes);
6230        #[allow(clippy::absurd_extreme_comparisons)]
6231        #[allow(unused_comparisons)]
6232        if __tmp.remaining() < Self::ENCODED_LEN {
6233            panic!(
6234                "buffer is too small (need {} bytes, but got {})",
6235                Self::ENCODED_LEN,
6236                __tmp.remaining(),
6237            )
6238        }
6239        __tmp.put_u8(self.target_system);
6240        __tmp.put_u8(self.target_component);
6241        __tmp.put_u8(self.mission_type as u8);
6242        if matches!(version, MavlinkVersion::V2) {
6243            let len = __tmp.len();
6244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6245        } else {
6246            __tmp.len()
6247        }
6248    }
6249}
6250#[doc = "id: 42"]
6251#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
6252#[derive(Debug, Clone, PartialEq)]
6253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6255pub struct MISSION_CURRENT_DATA {
6256    #[doc = "Sequence"]
6257    pub seq: u16,
6258    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
6259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6260    pub total: u16,
6261    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
6262    #[cfg_attr(feature = "serde", serde(default))]
6263    pub mission_state: MissionState,
6264    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
6265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6266    pub mission_mode: u8,
6267    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
6268    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6269    pub mission_id: u32,
6270    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
6271    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6272    pub fence_id: u32,
6273    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
6274    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6275    pub rally_points_id: u32,
6276}
6277impl MISSION_CURRENT_DATA {
6278    pub const ENCODED_LEN: usize = 18usize;
6279    pub const DEFAULT: Self = Self {
6280        seq: 0_u16,
6281        total: 0_u16,
6282        mission_state: MissionState::DEFAULT,
6283        mission_mode: 0_u8,
6284        mission_id: 0_u32,
6285        fence_id: 0_u32,
6286        rally_points_id: 0_u32,
6287    };
6288    #[cfg(feature = "arbitrary")]
6289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6290        use arbitrary::{Arbitrary, Unstructured};
6291        let mut buf = [0u8; 1024];
6292        rng.fill_bytes(&mut buf);
6293        let mut unstructured = Unstructured::new(&buf);
6294        Self::arbitrary(&mut unstructured).unwrap_or_default()
6295    }
6296}
6297impl Default for MISSION_CURRENT_DATA {
6298    fn default() -> Self {
6299        Self::DEFAULT.clone()
6300    }
6301}
6302impl MessageData for MISSION_CURRENT_DATA {
6303    type Message = MavMessage;
6304    const ID: u32 = 42u32;
6305    const NAME: &'static str = "MISSION_CURRENT";
6306    const EXTRA_CRC: u8 = 28u8;
6307    const ENCODED_LEN: usize = 18usize;
6308    fn deser(
6309        _version: MavlinkVersion,
6310        __input: &[u8],
6311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6312        let avail_len = __input.len();
6313        let mut payload_buf = [0; Self::ENCODED_LEN];
6314        let mut buf = if avail_len < Self::ENCODED_LEN {
6315            payload_buf[0..avail_len].copy_from_slice(__input);
6316            Bytes::new(&payload_buf)
6317        } else {
6318            Bytes::new(__input)
6319        };
6320        let mut __struct = Self::default();
6321        __struct.seq = buf.get_u16_le();
6322        __struct.total = buf.get_u16_le();
6323        let tmp = buf.get_u8();
6324        __struct.mission_state =
6325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6326                enum_type: "MissionState",
6327                value: tmp as u32,
6328            })?;
6329        __struct.mission_mode = buf.get_u8();
6330        __struct.mission_id = buf.get_u32_le();
6331        __struct.fence_id = buf.get_u32_le();
6332        __struct.rally_points_id = buf.get_u32_le();
6333        Ok(__struct)
6334    }
6335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6336        let mut __tmp = BytesMut::new(bytes);
6337        #[allow(clippy::absurd_extreme_comparisons)]
6338        #[allow(unused_comparisons)]
6339        if __tmp.remaining() < Self::ENCODED_LEN {
6340            panic!(
6341                "buffer is too small (need {} bytes, but got {})",
6342                Self::ENCODED_LEN,
6343                __tmp.remaining(),
6344            )
6345        }
6346        __tmp.put_u16_le(self.seq);
6347        __tmp.put_u16_le(self.total);
6348        __tmp.put_u8(self.mission_state as u8);
6349        __tmp.put_u8(self.mission_mode);
6350        __tmp.put_u32_le(self.mission_id);
6351        __tmp.put_u32_le(self.fence_id);
6352        __tmp.put_u32_le(self.rally_points_id);
6353        if matches!(version, MavlinkVersion::V2) {
6354            let len = __tmp.len();
6355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6356        } else {
6357            __tmp.len()
6358        }
6359    }
6360}
6361#[doc = "id: 412"]
6362#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
6363#[derive(Debug, Clone, PartialEq)]
6364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6366pub struct REQUEST_EVENT_DATA {
6367    #[doc = "First sequence number of the requested event."]
6368    pub first_sequence: u16,
6369    #[doc = "Last sequence number of the requested event."]
6370    pub last_sequence: u16,
6371    #[doc = "System ID"]
6372    pub target_system: u8,
6373    #[doc = "Component ID"]
6374    pub target_component: u8,
6375}
6376impl REQUEST_EVENT_DATA {
6377    pub const ENCODED_LEN: usize = 6usize;
6378    pub const DEFAULT: Self = Self {
6379        first_sequence: 0_u16,
6380        last_sequence: 0_u16,
6381        target_system: 0_u8,
6382        target_component: 0_u8,
6383    };
6384    #[cfg(feature = "arbitrary")]
6385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6386        use arbitrary::{Arbitrary, Unstructured};
6387        let mut buf = [0u8; 1024];
6388        rng.fill_bytes(&mut buf);
6389        let mut unstructured = Unstructured::new(&buf);
6390        Self::arbitrary(&mut unstructured).unwrap_or_default()
6391    }
6392}
6393impl Default for REQUEST_EVENT_DATA {
6394    fn default() -> Self {
6395        Self::DEFAULT.clone()
6396    }
6397}
6398impl MessageData for REQUEST_EVENT_DATA {
6399    type Message = MavMessage;
6400    const ID: u32 = 412u32;
6401    const NAME: &'static str = "REQUEST_EVENT";
6402    const EXTRA_CRC: u8 = 33u8;
6403    const ENCODED_LEN: usize = 6usize;
6404    fn deser(
6405        _version: MavlinkVersion,
6406        __input: &[u8],
6407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6408        let avail_len = __input.len();
6409        let mut payload_buf = [0; Self::ENCODED_LEN];
6410        let mut buf = if avail_len < Self::ENCODED_LEN {
6411            payload_buf[0..avail_len].copy_from_slice(__input);
6412            Bytes::new(&payload_buf)
6413        } else {
6414            Bytes::new(__input)
6415        };
6416        let mut __struct = Self::default();
6417        __struct.first_sequence = buf.get_u16_le();
6418        __struct.last_sequence = buf.get_u16_le();
6419        __struct.target_system = buf.get_u8();
6420        __struct.target_component = buf.get_u8();
6421        Ok(__struct)
6422    }
6423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6424        let mut __tmp = BytesMut::new(bytes);
6425        #[allow(clippy::absurd_extreme_comparisons)]
6426        #[allow(unused_comparisons)]
6427        if __tmp.remaining() < Self::ENCODED_LEN {
6428            panic!(
6429                "buffer is too small (need {} bytes, but got {})",
6430                Self::ENCODED_LEN,
6431                __tmp.remaining(),
6432            )
6433        }
6434        __tmp.put_u16_le(self.first_sequence);
6435        __tmp.put_u16_le(self.last_sequence);
6436        __tmp.put_u8(self.target_system);
6437        __tmp.put_u8(self.target_component);
6438        if matches!(version, MavlinkVersion::V2) {
6439            let len = __tmp.len();
6440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6441        } else {
6442            __tmp.len()
6443        }
6444    }
6445}
6446#[doc = "id: 385"]
6447#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
6448#[derive(Debug, Clone, PartialEq)]
6449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6451pub struct TUNNEL_DATA {
6452    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
6453    pub payload_type: MavTunnelPayloadType,
6454    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
6455    pub target_system: u8,
6456    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
6457    pub target_component: u8,
6458    #[doc = "Length of the data transported in payload"]
6459    pub payload_length: u8,
6460    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
6461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6462    pub payload: [u8; 128],
6463}
6464impl TUNNEL_DATA {
6465    pub const ENCODED_LEN: usize = 133usize;
6466    pub const DEFAULT: Self = Self {
6467        payload_type: MavTunnelPayloadType::DEFAULT,
6468        target_system: 0_u8,
6469        target_component: 0_u8,
6470        payload_length: 0_u8,
6471        payload: [0_u8; 128usize],
6472    };
6473    #[cfg(feature = "arbitrary")]
6474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6475        use arbitrary::{Arbitrary, Unstructured};
6476        let mut buf = [0u8; 1024];
6477        rng.fill_bytes(&mut buf);
6478        let mut unstructured = Unstructured::new(&buf);
6479        Self::arbitrary(&mut unstructured).unwrap_or_default()
6480    }
6481}
6482impl Default for TUNNEL_DATA {
6483    fn default() -> Self {
6484        Self::DEFAULT.clone()
6485    }
6486}
6487impl MessageData for TUNNEL_DATA {
6488    type Message = MavMessage;
6489    const ID: u32 = 385u32;
6490    const NAME: &'static str = "TUNNEL";
6491    const EXTRA_CRC: u8 = 147u8;
6492    const ENCODED_LEN: usize = 133usize;
6493    fn deser(
6494        _version: MavlinkVersion,
6495        __input: &[u8],
6496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6497        let avail_len = __input.len();
6498        let mut payload_buf = [0; Self::ENCODED_LEN];
6499        let mut buf = if avail_len < Self::ENCODED_LEN {
6500            payload_buf[0..avail_len].copy_from_slice(__input);
6501            Bytes::new(&payload_buf)
6502        } else {
6503            Bytes::new(__input)
6504        };
6505        let mut __struct = Self::default();
6506        let tmp = buf.get_u16_le();
6507        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
6508            ::mavlink_core::error::ParserError::InvalidEnum {
6509                enum_type: "MavTunnelPayloadType",
6510                value: tmp as u32,
6511            },
6512        )?;
6513        __struct.target_system = buf.get_u8();
6514        __struct.target_component = buf.get_u8();
6515        __struct.payload_length = buf.get_u8();
6516        for v in &mut __struct.payload {
6517            let val = buf.get_u8();
6518            *v = val;
6519        }
6520        Ok(__struct)
6521    }
6522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6523        let mut __tmp = BytesMut::new(bytes);
6524        #[allow(clippy::absurd_extreme_comparisons)]
6525        #[allow(unused_comparisons)]
6526        if __tmp.remaining() < Self::ENCODED_LEN {
6527            panic!(
6528                "buffer is too small (need {} bytes, but got {})",
6529                Self::ENCODED_LEN,
6530                __tmp.remaining(),
6531            )
6532        }
6533        __tmp.put_u16_le(self.payload_type as u16);
6534        __tmp.put_u8(self.target_system);
6535        __tmp.put_u8(self.target_component);
6536        __tmp.put_u8(self.payload_length);
6537        for val in &self.payload {
6538            __tmp.put_u8(*val);
6539        }
6540        if matches!(version, MavlinkVersion::V2) {
6541            let len = __tmp.len();
6542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6543        } else {
6544            __tmp.len()
6545        }
6546    }
6547}
6548#[doc = "id: 103"]
6549#[doc = "Speed estimate from a vision source."]
6550#[derive(Debug, Clone, PartialEq)]
6551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6553pub struct VISION_SPEED_ESTIMATE_DATA {
6554    #[doc = "Timestamp (UNIX time or time since system boot)"]
6555    pub usec: u64,
6556    #[doc = "Global X speed"]
6557    pub x: f32,
6558    #[doc = "Global Y speed"]
6559    pub y: f32,
6560    #[doc = "Global Z speed"]
6561    pub z: f32,
6562    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
6563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6565    pub covariance: [f32; 9],
6566    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
6567    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6568    pub reset_counter: u8,
6569}
6570impl VISION_SPEED_ESTIMATE_DATA {
6571    pub const ENCODED_LEN: usize = 57usize;
6572    pub const DEFAULT: Self = Self {
6573        usec: 0_u64,
6574        x: 0.0_f32,
6575        y: 0.0_f32,
6576        z: 0.0_f32,
6577        covariance: [0.0_f32; 9usize],
6578        reset_counter: 0_u8,
6579    };
6580    #[cfg(feature = "arbitrary")]
6581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6582        use arbitrary::{Arbitrary, Unstructured};
6583        let mut buf = [0u8; 1024];
6584        rng.fill_bytes(&mut buf);
6585        let mut unstructured = Unstructured::new(&buf);
6586        Self::arbitrary(&mut unstructured).unwrap_or_default()
6587    }
6588}
6589impl Default for VISION_SPEED_ESTIMATE_DATA {
6590    fn default() -> Self {
6591        Self::DEFAULT.clone()
6592    }
6593}
6594impl MessageData for VISION_SPEED_ESTIMATE_DATA {
6595    type Message = MavMessage;
6596    const ID: u32 = 103u32;
6597    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
6598    const EXTRA_CRC: u8 = 208u8;
6599    const ENCODED_LEN: usize = 57usize;
6600    fn deser(
6601        _version: MavlinkVersion,
6602        __input: &[u8],
6603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6604        let avail_len = __input.len();
6605        let mut payload_buf = [0; Self::ENCODED_LEN];
6606        let mut buf = if avail_len < Self::ENCODED_LEN {
6607            payload_buf[0..avail_len].copy_from_slice(__input);
6608            Bytes::new(&payload_buf)
6609        } else {
6610            Bytes::new(__input)
6611        };
6612        let mut __struct = Self::default();
6613        __struct.usec = buf.get_u64_le();
6614        __struct.x = buf.get_f32_le();
6615        __struct.y = buf.get_f32_le();
6616        __struct.z = buf.get_f32_le();
6617        for v in &mut __struct.covariance {
6618            let val = buf.get_f32_le();
6619            *v = val;
6620        }
6621        __struct.reset_counter = buf.get_u8();
6622        Ok(__struct)
6623    }
6624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6625        let mut __tmp = BytesMut::new(bytes);
6626        #[allow(clippy::absurd_extreme_comparisons)]
6627        #[allow(unused_comparisons)]
6628        if __tmp.remaining() < Self::ENCODED_LEN {
6629            panic!(
6630                "buffer is too small (need {} bytes, but got {})",
6631                Self::ENCODED_LEN,
6632                __tmp.remaining(),
6633            )
6634        }
6635        __tmp.put_u64_le(self.usec);
6636        __tmp.put_f32_le(self.x);
6637        __tmp.put_f32_le(self.y);
6638        __tmp.put_f32_le(self.z);
6639        for val in &self.covariance {
6640            __tmp.put_f32_le(*val);
6641        }
6642        __tmp.put_u8(self.reset_counter);
6643        if matches!(version, MavlinkVersion::V2) {
6644            let len = __tmp.len();
6645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6646        } else {
6647            __tmp.len()
6648        }
6649    }
6650}
6651#[doc = "id: 142"]
6652#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
6653#[derive(Debug, Clone, PartialEq)]
6654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6656pub struct RESOURCE_REQUEST_DATA {
6657    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
6658    pub request_id: u8,
6659    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
6660    pub uri_type: u8,
6661    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
6662    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6663    pub uri: [u8; 120],
6664    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
6665    pub transfer_type: u8,
6666    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
6667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6668    pub storage: [u8; 120],
6669}
6670impl RESOURCE_REQUEST_DATA {
6671    pub const ENCODED_LEN: usize = 243usize;
6672    pub const DEFAULT: Self = Self {
6673        request_id: 0_u8,
6674        uri_type: 0_u8,
6675        uri: [0_u8; 120usize],
6676        transfer_type: 0_u8,
6677        storage: [0_u8; 120usize],
6678    };
6679    #[cfg(feature = "arbitrary")]
6680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6681        use arbitrary::{Arbitrary, Unstructured};
6682        let mut buf = [0u8; 1024];
6683        rng.fill_bytes(&mut buf);
6684        let mut unstructured = Unstructured::new(&buf);
6685        Self::arbitrary(&mut unstructured).unwrap_or_default()
6686    }
6687}
6688impl Default for RESOURCE_REQUEST_DATA {
6689    fn default() -> Self {
6690        Self::DEFAULT.clone()
6691    }
6692}
6693impl MessageData for RESOURCE_REQUEST_DATA {
6694    type Message = MavMessage;
6695    const ID: u32 = 142u32;
6696    const NAME: &'static str = "RESOURCE_REQUEST";
6697    const EXTRA_CRC: u8 = 72u8;
6698    const ENCODED_LEN: usize = 243usize;
6699    fn deser(
6700        _version: MavlinkVersion,
6701        __input: &[u8],
6702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6703        let avail_len = __input.len();
6704        let mut payload_buf = [0; Self::ENCODED_LEN];
6705        let mut buf = if avail_len < Self::ENCODED_LEN {
6706            payload_buf[0..avail_len].copy_from_slice(__input);
6707            Bytes::new(&payload_buf)
6708        } else {
6709            Bytes::new(__input)
6710        };
6711        let mut __struct = Self::default();
6712        __struct.request_id = buf.get_u8();
6713        __struct.uri_type = buf.get_u8();
6714        for v in &mut __struct.uri {
6715            let val = buf.get_u8();
6716            *v = val;
6717        }
6718        __struct.transfer_type = buf.get_u8();
6719        for v in &mut __struct.storage {
6720            let val = buf.get_u8();
6721            *v = val;
6722        }
6723        Ok(__struct)
6724    }
6725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6726        let mut __tmp = BytesMut::new(bytes);
6727        #[allow(clippy::absurd_extreme_comparisons)]
6728        #[allow(unused_comparisons)]
6729        if __tmp.remaining() < Self::ENCODED_LEN {
6730            panic!(
6731                "buffer is too small (need {} bytes, but got {})",
6732                Self::ENCODED_LEN,
6733                __tmp.remaining(),
6734            )
6735        }
6736        __tmp.put_u8(self.request_id);
6737        __tmp.put_u8(self.uri_type);
6738        for val in &self.uri {
6739            __tmp.put_u8(*val);
6740        }
6741        __tmp.put_u8(self.transfer_type);
6742        for val in &self.storage {
6743            __tmp.put_u8(*val);
6744        }
6745        if matches!(version, MavlinkVersion::V2) {
6746            let len = __tmp.len();
6747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6748        } else {
6749            __tmp.len()
6750        }
6751    }
6752}
6753#[doc = "id: 62"]
6754#[doc = "The state of the navigation and position controller."]
6755#[derive(Debug, Clone, PartialEq)]
6756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6758pub struct NAV_CONTROLLER_OUTPUT_DATA {
6759    #[doc = "Current desired roll"]
6760    pub nav_roll: f32,
6761    #[doc = "Current desired pitch"]
6762    pub nav_pitch: f32,
6763    #[doc = "Current altitude error"]
6764    pub alt_error: f32,
6765    #[doc = "Current airspeed error"]
6766    pub aspd_error: f32,
6767    #[doc = "Current crosstrack error on x-y plane"]
6768    pub xtrack_error: f32,
6769    #[doc = "Current desired heading"]
6770    pub nav_bearing: i16,
6771    #[doc = "Bearing to current waypoint/target"]
6772    pub target_bearing: i16,
6773    #[doc = "Distance to active waypoint"]
6774    pub wp_dist: u16,
6775}
6776impl NAV_CONTROLLER_OUTPUT_DATA {
6777    pub const ENCODED_LEN: usize = 26usize;
6778    pub const DEFAULT: Self = Self {
6779        nav_roll: 0.0_f32,
6780        nav_pitch: 0.0_f32,
6781        alt_error: 0.0_f32,
6782        aspd_error: 0.0_f32,
6783        xtrack_error: 0.0_f32,
6784        nav_bearing: 0_i16,
6785        target_bearing: 0_i16,
6786        wp_dist: 0_u16,
6787    };
6788    #[cfg(feature = "arbitrary")]
6789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6790        use arbitrary::{Arbitrary, Unstructured};
6791        let mut buf = [0u8; 1024];
6792        rng.fill_bytes(&mut buf);
6793        let mut unstructured = Unstructured::new(&buf);
6794        Self::arbitrary(&mut unstructured).unwrap_or_default()
6795    }
6796}
6797impl Default for NAV_CONTROLLER_OUTPUT_DATA {
6798    fn default() -> Self {
6799        Self::DEFAULT.clone()
6800    }
6801}
6802impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
6803    type Message = MavMessage;
6804    const ID: u32 = 62u32;
6805    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
6806    const EXTRA_CRC: u8 = 183u8;
6807    const ENCODED_LEN: usize = 26usize;
6808    fn deser(
6809        _version: MavlinkVersion,
6810        __input: &[u8],
6811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6812        let avail_len = __input.len();
6813        let mut payload_buf = [0; Self::ENCODED_LEN];
6814        let mut buf = if avail_len < Self::ENCODED_LEN {
6815            payload_buf[0..avail_len].copy_from_slice(__input);
6816            Bytes::new(&payload_buf)
6817        } else {
6818            Bytes::new(__input)
6819        };
6820        let mut __struct = Self::default();
6821        __struct.nav_roll = buf.get_f32_le();
6822        __struct.nav_pitch = buf.get_f32_le();
6823        __struct.alt_error = buf.get_f32_le();
6824        __struct.aspd_error = buf.get_f32_le();
6825        __struct.xtrack_error = buf.get_f32_le();
6826        __struct.nav_bearing = buf.get_i16_le();
6827        __struct.target_bearing = buf.get_i16_le();
6828        __struct.wp_dist = buf.get_u16_le();
6829        Ok(__struct)
6830    }
6831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6832        let mut __tmp = BytesMut::new(bytes);
6833        #[allow(clippy::absurd_extreme_comparisons)]
6834        #[allow(unused_comparisons)]
6835        if __tmp.remaining() < Self::ENCODED_LEN {
6836            panic!(
6837                "buffer is too small (need {} bytes, but got {})",
6838                Self::ENCODED_LEN,
6839                __tmp.remaining(),
6840            )
6841        }
6842        __tmp.put_f32_le(self.nav_roll);
6843        __tmp.put_f32_le(self.nav_pitch);
6844        __tmp.put_f32_le(self.alt_error);
6845        __tmp.put_f32_le(self.aspd_error);
6846        __tmp.put_f32_le(self.xtrack_error);
6847        __tmp.put_i16_le(self.nav_bearing);
6848        __tmp.put_i16_le(self.target_bearing);
6849        __tmp.put_u16_le(self.wp_dist);
6850        if matches!(version, MavlinkVersion::V2) {
6851            let len = __tmp.len();
6852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6853        } else {
6854            __tmp.len()
6855        }
6856    }
6857}
6858#[doc = "id: 63"]
6859#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
6860#[derive(Debug, Clone, PartialEq)]
6861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6863pub struct GLOBAL_POSITION_INT_COV_DATA {
6864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6865    pub time_usec: u64,
6866    #[doc = "Latitude"]
6867    pub lat: i32,
6868    #[doc = "Longitude"]
6869    pub lon: i32,
6870    #[doc = "Altitude in meters above MSL"]
6871    pub alt: i32,
6872    #[doc = "Altitude above ground"]
6873    pub relative_alt: i32,
6874    #[doc = "Ground X Speed (Latitude)"]
6875    pub vx: f32,
6876    #[doc = "Ground Y Speed (Longitude)"]
6877    pub vy: f32,
6878    #[doc = "Ground Z Speed (Altitude)"]
6879    pub vz: f32,
6880    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6882    pub covariance: [f32; 36],
6883    #[doc = "Class id of the estimator this estimate originated from."]
6884    pub estimator_type: MavEstimatorType,
6885}
6886impl GLOBAL_POSITION_INT_COV_DATA {
6887    pub const ENCODED_LEN: usize = 181usize;
6888    pub const DEFAULT: Self = Self {
6889        time_usec: 0_u64,
6890        lat: 0_i32,
6891        lon: 0_i32,
6892        alt: 0_i32,
6893        relative_alt: 0_i32,
6894        vx: 0.0_f32,
6895        vy: 0.0_f32,
6896        vz: 0.0_f32,
6897        covariance: [0.0_f32; 36usize],
6898        estimator_type: MavEstimatorType::DEFAULT,
6899    };
6900    #[cfg(feature = "arbitrary")]
6901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6902        use arbitrary::{Arbitrary, Unstructured};
6903        let mut buf = [0u8; 1024];
6904        rng.fill_bytes(&mut buf);
6905        let mut unstructured = Unstructured::new(&buf);
6906        Self::arbitrary(&mut unstructured).unwrap_or_default()
6907    }
6908}
6909impl Default for GLOBAL_POSITION_INT_COV_DATA {
6910    fn default() -> Self {
6911        Self::DEFAULT.clone()
6912    }
6913}
6914impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
6915    type Message = MavMessage;
6916    const ID: u32 = 63u32;
6917    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
6918    const EXTRA_CRC: u8 = 119u8;
6919    const ENCODED_LEN: usize = 181usize;
6920    fn deser(
6921        _version: MavlinkVersion,
6922        __input: &[u8],
6923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6924        let avail_len = __input.len();
6925        let mut payload_buf = [0; Self::ENCODED_LEN];
6926        let mut buf = if avail_len < Self::ENCODED_LEN {
6927            payload_buf[0..avail_len].copy_from_slice(__input);
6928            Bytes::new(&payload_buf)
6929        } else {
6930            Bytes::new(__input)
6931        };
6932        let mut __struct = Self::default();
6933        __struct.time_usec = buf.get_u64_le();
6934        __struct.lat = buf.get_i32_le();
6935        __struct.lon = buf.get_i32_le();
6936        __struct.alt = buf.get_i32_le();
6937        __struct.relative_alt = buf.get_i32_le();
6938        __struct.vx = buf.get_f32_le();
6939        __struct.vy = buf.get_f32_le();
6940        __struct.vz = buf.get_f32_le();
6941        for v in &mut __struct.covariance {
6942            let val = buf.get_f32_le();
6943            *v = val;
6944        }
6945        let tmp = buf.get_u8();
6946        __struct.estimator_type =
6947            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6948                enum_type: "MavEstimatorType",
6949                value: tmp as u32,
6950            })?;
6951        Ok(__struct)
6952    }
6953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6954        let mut __tmp = BytesMut::new(bytes);
6955        #[allow(clippy::absurd_extreme_comparisons)]
6956        #[allow(unused_comparisons)]
6957        if __tmp.remaining() < Self::ENCODED_LEN {
6958            panic!(
6959                "buffer is too small (need {} bytes, but got {})",
6960                Self::ENCODED_LEN,
6961                __tmp.remaining(),
6962            )
6963        }
6964        __tmp.put_u64_le(self.time_usec);
6965        __tmp.put_i32_le(self.lat);
6966        __tmp.put_i32_le(self.lon);
6967        __tmp.put_i32_le(self.alt);
6968        __tmp.put_i32_le(self.relative_alt);
6969        __tmp.put_f32_le(self.vx);
6970        __tmp.put_f32_le(self.vy);
6971        __tmp.put_f32_le(self.vz);
6972        for val in &self.covariance {
6973            __tmp.put_f32_le(*val);
6974        }
6975        __tmp.put_u8(self.estimator_type as u8);
6976        if matches!(version, MavlinkVersion::V2) {
6977            let len = __tmp.len();
6978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6979        } else {
6980            __tmp.len()
6981        }
6982    }
6983}
6984#[doc = "id: 230"]
6985#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
6986#[derive(Debug, Clone, PartialEq)]
6987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6989pub struct ESTIMATOR_STATUS_DATA {
6990    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6991    pub time_usec: u64,
6992    #[doc = "Velocity innovation test ratio"]
6993    pub vel_ratio: f32,
6994    #[doc = "Horizontal position innovation test ratio"]
6995    pub pos_horiz_ratio: f32,
6996    #[doc = "Vertical position innovation test ratio"]
6997    pub pos_vert_ratio: f32,
6998    #[doc = "Magnetometer innovation test ratio"]
6999    pub mag_ratio: f32,
7000    #[doc = "Height above terrain innovation test ratio"]
7001    pub hagl_ratio: f32,
7002    #[doc = "True airspeed innovation test ratio"]
7003    pub tas_ratio: f32,
7004    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
7005    pub pos_horiz_accuracy: f32,
7006    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
7007    pub pos_vert_accuracy: f32,
7008    #[doc = "Bitmap indicating which EKF outputs are valid."]
7009    pub flags: EstimatorStatusFlags,
7010}
7011impl ESTIMATOR_STATUS_DATA {
7012    pub const ENCODED_LEN: usize = 42usize;
7013    pub const DEFAULT: Self = Self {
7014        time_usec: 0_u64,
7015        vel_ratio: 0.0_f32,
7016        pos_horiz_ratio: 0.0_f32,
7017        pos_vert_ratio: 0.0_f32,
7018        mag_ratio: 0.0_f32,
7019        hagl_ratio: 0.0_f32,
7020        tas_ratio: 0.0_f32,
7021        pos_horiz_accuracy: 0.0_f32,
7022        pos_vert_accuracy: 0.0_f32,
7023        flags: EstimatorStatusFlags::DEFAULT,
7024    };
7025    #[cfg(feature = "arbitrary")]
7026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7027        use arbitrary::{Arbitrary, Unstructured};
7028        let mut buf = [0u8; 1024];
7029        rng.fill_bytes(&mut buf);
7030        let mut unstructured = Unstructured::new(&buf);
7031        Self::arbitrary(&mut unstructured).unwrap_or_default()
7032    }
7033}
7034impl Default for ESTIMATOR_STATUS_DATA {
7035    fn default() -> Self {
7036        Self::DEFAULT.clone()
7037    }
7038}
7039impl MessageData for ESTIMATOR_STATUS_DATA {
7040    type Message = MavMessage;
7041    const ID: u32 = 230u32;
7042    const NAME: &'static str = "ESTIMATOR_STATUS";
7043    const EXTRA_CRC: u8 = 163u8;
7044    const ENCODED_LEN: usize = 42usize;
7045    fn deser(
7046        _version: MavlinkVersion,
7047        __input: &[u8],
7048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7049        let avail_len = __input.len();
7050        let mut payload_buf = [0; Self::ENCODED_LEN];
7051        let mut buf = if avail_len < Self::ENCODED_LEN {
7052            payload_buf[0..avail_len].copy_from_slice(__input);
7053            Bytes::new(&payload_buf)
7054        } else {
7055            Bytes::new(__input)
7056        };
7057        let mut __struct = Self::default();
7058        __struct.time_usec = buf.get_u64_le();
7059        __struct.vel_ratio = buf.get_f32_le();
7060        __struct.pos_horiz_ratio = buf.get_f32_le();
7061        __struct.pos_vert_ratio = buf.get_f32_le();
7062        __struct.mag_ratio = buf.get_f32_le();
7063        __struct.hagl_ratio = buf.get_f32_le();
7064        __struct.tas_ratio = buf.get_f32_le();
7065        __struct.pos_horiz_accuracy = buf.get_f32_le();
7066        __struct.pos_vert_accuracy = buf.get_f32_le();
7067        let tmp = buf.get_u16_le();
7068        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
7069            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7070                flag_type: "EstimatorStatusFlags",
7071                value: tmp as u32,
7072            })?;
7073        Ok(__struct)
7074    }
7075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7076        let mut __tmp = BytesMut::new(bytes);
7077        #[allow(clippy::absurd_extreme_comparisons)]
7078        #[allow(unused_comparisons)]
7079        if __tmp.remaining() < Self::ENCODED_LEN {
7080            panic!(
7081                "buffer is too small (need {} bytes, but got {})",
7082                Self::ENCODED_LEN,
7083                __tmp.remaining(),
7084            )
7085        }
7086        __tmp.put_u64_le(self.time_usec);
7087        __tmp.put_f32_le(self.vel_ratio);
7088        __tmp.put_f32_le(self.pos_horiz_ratio);
7089        __tmp.put_f32_le(self.pos_vert_ratio);
7090        __tmp.put_f32_le(self.mag_ratio);
7091        __tmp.put_f32_le(self.hagl_ratio);
7092        __tmp.put_f32_le(self.tas_ratio);
7093        __tmp.put_f32_le(self.pos_horiz_accuracy);
7094        __tmp.put_f32_le(self.pos_vert_accuracy);
7095        __tmp.put_u16_le(self.flags.bits());
7096        if matches!(version, MavlinkVersion::V2) {
7097            let len = __tmp.len();
7098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7099        } else {
7100            __tmp.len()
7101        }
7102    }
7103}
7104#[doc = "id: 335"]
7105#[doc = "Status of the Iridium SBD link."]
7106#[derive(Debug, Clone, PartialEq)]
7107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7109pub struct ISBD_LINK_STATUS_DATA {
7110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7111    pub timestamp: u64,
7112    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7113    pub last_heartbeat: u64,
7114    #[doc = "Number of failed SBD sessions."]
7115    pub failed_sessions: u16,
7116    #[doc = "Number of successful SBD sessions."]
7117    pub successful_sessions: u16,
7118    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
7119    pub signal_quality: u8,
7120    #[doc = "1: Ring call pending, 0: No call pending."]
7121    pub ring_pending: u8,
7122    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
7123    pub tx_session_pending: u8,
7124    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
7125    pub rx_session_pending: u8,
7126}
7127impl ISBD_LINK_STATUS_DATA {
7128    pub const ENCODED_LEN: usize = 24usize;
7129    pub const DEFAULT: Self = Self {
7130        timestamp: 0_u64,
7131        last_heartbeat: 0_u64,
7132        failed_sessions: 0_u16,
7133        successful_sessions: 0_u16,
7134        signal_quality: 0_u8,
7135        ring_pending: 0_u8,
7136        tx_session_pending: 0_u8,
7137        rx_session_pending: 0_u8,
7138    };
7139    #[cfg(feature = "arbitrary")]
7140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7141        use arbitrary::{Arbitrary, Unstructured};
7142        let mut buf = [0u8; 1024];
7143        rng.fill_bytes(&mut buf);
7144        let mut unstructured = Unstructured::new(&buf);
7145        Self::arbitrary(&mut unstructured).unwrap_or_default()
7146    }
7147}
7148impl Default for ISBD_LINK_STATUS_DATA {
7149    fn default() -> Self {
7150        Self::DEFAULT.clone()
7151    }
7152}
7153impl MessageData for ISBD_LINK_STATUS_DATA {
7154    type Message = MavMessage;
7155    const ID: u32 = 335u32;
7156    const NAME: &'static str = "ISBD_LINK_STATUS";
7157    const EXTRA_CRC: u8 = 225u8;
7158    const ENCODED_LEN: usize = 24usize;
7159    fn deser(
7160        _version: MavlinkVersion,
7161        __input: &[u8],
7162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7163        let avail_len = __input.len();
7164        let mut payload_buf = [0; Self::ENCODED_LEN];
7165        let mut buf = if avail_len < Self::ENCODED_LEN {
7166            payload_buf[0..avail_len].copy_from_slice(__input);
7167            Bytes::new(&payload_buf)
7168        } else {
7169            Bytes::new(__input)
7170        };
7171        let mut __struct = Self::default();
7172        __struct.timestamp = buf.get_u64_le();
7173        __struct.last_heartbeat = buf.get_u64_le();
7174        __struct.failed_sessions = buf.get_u16_le();
7175        __struct.successful_sessions = buf.get_u16_le();
7176        __struct.signal_quality = buf.get_u8();
7177        __struct.ring_pending = buf.get_u8();
7178        __struct.tx_session_pending = buf.get_u8();
7179        __struct.rx_session_pending = buf.get_u8();
7180        Ok(__struct)
7181    }
7182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7183        let mut __tmp = BytesMut::new(bytes);
7184        #[allow(clippy::absurd_extreme_comparisons)]
7185        #[allow(unused_comparisons)]
7186        if __tmp.remaining() < Self::ENCODED_LEN {
7187            panic!(
7188                "buffer is too small (need {} bytes, but got {})",
7189                Self::ENCODED_LEN,
7190                __tmp.remaining(),
7191            )
7192        }
7193        __tmp.put_u64_le(self.timestamp);
7194        __tmp.put_u64_le(self.last_heartbeat);
7195        __tmp.put_u16_le(self.failed_sessions);
7196        __tmp.put_u16_le(self.successful_sessions);
7197        __tmp.put_u8(self.signal_quality);
7198        __tmp.put_u8(self.ring_pending);
7199        __tmp.put_u8(self.tx_session_pending);
7200        __tmp.put_u8(self.rx_session_pending);
7201        if matches!(version, MavlinkVersion::V2) {
7202            let len = __tmp.len();
7203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7204        } else {
7205            __tmp.len()
7206        }
7207    }
7208}
7209#[doc = "id: 120"]
7210#[doc = "Reply to LOG_REQUEST_DATA."]
7211#[derive(Debug, Clone, PartialEq)]
7212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7214pub struct LOG_DATA_DATA {
7215    #[doc = "Offset into the log"]
7216    pub ofs: u32,
7217    #[doc = "Log id (from LOG_ENTRY reply)"]
7218    pub id: u16,
7219    #[doc = "Number of bytes (zero for end of log)"]
7220    pub count: u8,
7221    #[doc = "log data"]
7222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7223    pub data: [u8; 90],
7224}
7225impl LOG_DATA_DATA {
7226    pub const ENCODED_LEN: usize = 97usize;
7227    pub const DEFAULT: Self = Self {
7228        ofs: 0_u32,
7229        id: 0_u16,
7230        count: 0_u8,
7231        data: [0_u8; 90usize],
7232    };
7233    #[cfg(feature = "arbitrary")]
7234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7235        use arbitrary::{Arbitrary, Unstructured};
7236        let mut buf = [0u8; 1024];
7237        rng.fill_bytes(&mut buf);
7238        let mut unstructured = Unstructured::new(&buf);
7239        Self::arbitrary(&mut unstructured).unwrap_or_default()
7240    }
7241}
7242impl Default for LOG_DATA_DATA {
7243    fn default() -> Self {
7244        Self::DEFAULT.clone()
7245    }
7246}
7247impl MessageData for LOG_DATA_DATA {
7248    type Message = MavMessage;
7249    const ID: u32 = 120u32;
7250    const NAME: &'static str = "LOG_DATA";
7251    const EXTRA_CRC: u8 = 134u8;
7252    const ENCODED_LEN: usize = 97usize;
7253    fn deser(
7254        _version: MavlinkVersion,
7255        __input: &[u8],
7256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7257        let avail_len = __input.len();
7258        let mut payload_buf = [0; Self::ENCODED_LEN];
7259        let mut buf = if avail_len < Self::ENCODED_LEN {
7260            payload_buf[0..avail_len].copy_from_slice(__input);
7261            Bytes::new(&payload_buf)
7262        } else {
7263            Bytes::new(__input)
7264        };
7265        let mut __struct = Self::default();
7266        __struct.ofs = buf.get_u32_le();
7267        __struct.id = buf.get_u16_le();
7268        __struct.count = buf.get_u8();
7269        for v in &mut __struct.data {
7270            let val = buf.get_u8();
7271            *v = val;
7272        }
7273        Ok(__struct)
7274    }
7275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7276        let mut __tmp = BytesMut::new(bytes);
7277        #[allow(clippy::absurd_extreme_comparisons)]
7278        #[allow(unused_comparisons)]
7279        if __tmp.remaining() < Self::ENCODED_LEN {
7280            panic!(
7281                "buffer is too small (need {} bytes, but got {})",
7282                Self::ENCODED_LEN,
7283                __tmp.remaining(),
7284            )
7285        }
7286        __tmp.put_u32_le(self.ofs);
7287        __tmp.put_u16_le(self.id);
7288        __tmp.put_u8(self.count);
7289        for val in &self.data {
7290            __tmp.put_u8(*val);
7291        }
7292        if matches!(version, MavlinkVersion::V2) {
7293            let len = __tmp.len();
7294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7295        } else {
7296            __tmp.len()
7297        }
7298    }
7299}
7300#[doc = "id: 131"]
7301#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
7302#[derive(Debug, Clone, PartialEq)]
7303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7305pub struct ENCAPSULATED_DATA_DATA {
7306    #[doc = "sequence number (starting with 0 on every transmission)"]
7307    pub seqnr: u16,
7308    #[doc = "image data bytes"]
7309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7310    pub data: [u8; 253],
7311}
7312impl ENCAPSULATED_DATA_DATA {
7313    pub const ENCODED_LEN: usize = 255usize;
7314    pub const DEFAULT: Self = Self {
7315        seqnr: 0_u16,
7316        data: [0_u8; 253usize],
7317    };
7318    #[cfg(feature = "arbitrary")]
7319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7320        use arbitrary::{Arbitrary, Unstructured};
7321        let mut buf = [0u8; 1024];
7322        rng.fill_bytes(&mut buf);
7323        let mut unstructured = Unstructured::new(&buf);
7324        Self::arbitrary(&mut unstructured).unwrap_or_default()
7325    }
7326}
7327impl Default for ENCAPSULATED_DATA_DATA {
7328    fn default() -> Self {
7329        Self::DEFAULT.clone()
7330    }
7331}
7332impl MessageData for ENCAPSULATED_DATA_DATA {
7333    type Message = MavMessage;
7334    const ID: u32 = 131u32;
7335    const NAME: &'static str = "ENCAPSULATED_DATA";
7336    const EXTRA_CRC: u8 = 223u8;
7337    const ENCODED_LEN: usize = 255usize;
7338    fn deser(
7339        _version: MavlinkVersion,
7340        __input: &[u8],
7341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7342        let avail_len = __input.len();
7343        let mut payload_buf = [0; Self::ENCODED_LEN];
7344        let mut buf = if avail_len < Self::ENCODED_LEN {
7345            payload_buf[0..avail_len].copy_from_slice(__input);
7346            Bytes::new(&payload_buf)
7347        } else {
7348            Bytes::new(__input)
7349        };
7350        let mut __struct = Self::default();
7351        __struct.seqnr = buf.get_u16_le();
7352        for v in &mut __struct.data {
7353            let val = buf.get_u8();
7354            *v = val;
7355        }
7356        Ok(__struct)
7357    }
7358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7359        let mut __tmp = BytesMut::new(bytes);
7360        #[allow(clippy::absurd_extreme_comparisons)]
7361        #[allow(unused_comparisons)]
7362        if __tmp.remaining() < Self::ENCODED_LEN {
7363            panic!(
7364                "buffer is too small (need {} bytes, but got {})",
7365                Self::ENCODED_LEN,
7366                __tmp.remaining(),
7367            )
7368        }
7369        __tmp.put_u16_le(self.seqnr);
7370        for val in &self.data {
7371            __tmp.put_u8(*val);
7372        }
7373        if matches!(version, MavlinkVersion::V2) {
7374            let len = __tmp.len();
7375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7376        } else {
7377            __tmp.len()
7378        }
7379    }
7380}
7381#[doc = "id: 322"]
7382#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
7383#[derive(Debug, Clone, PartialEq)]
7384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7386pub struct PARAM_EXT_VALUE_DATA {
7387    #[doc = "Total number of parameters"]
7388    pub param_count: u16,
7389    #[doc = "Index of this parameter"]
7390    pub param_index: u16,
7391    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
7392    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7393    pub param_id: [u8; 16],
7394    #[doc = "Parameter value"]
7395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7396    pub param_value: [u8; 128],
7397    #[doc = "Parameter type."]
7398    pub param_type: MavParamExtType,
7399}
7400impl PARAM_EXT_VALUE_DATA {
7401    pub const ENCODED_LEN: usize = 149usize;
7402    pub const DEFAULT: Self = Self {
7403        param_count: 0_u16,
7404        param_index: 0_u16,
7405        param_id: [0_u8; 16usize],
7406        param_value: [0_u8; 128usize],
7407        param_type: MavParamExtType::DEFAULT,
7408    };
7409    #[cfg(feature = "arbitrary")]
7410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7411        use arbitrary::{Arbitrary, Unstructured};
7412        let mut buf = [0u8; 1024];
7413        rng.fill_bytes(&mut buf);
7414        let mut unstructured = Unstructured::new(&buf);
7415        Self::arbitrary(&mut unstructured).unwrap_or_default()
7416    }
7417}
7418impl Default for PARAM_EXT_VALUE_DATA {
7419    fn default() -> Self {
7420        Self::DEFAULT.clone()
7421    }
7422}
7423impl MessageData for PARAM_EXT_VALUE_DATA {
7424    type Message = MavMessage;
7425    const ID: u32 = 322u32;
7426    const NAME: &'static str = "PARAM_EXT_VALUE";
7427    const EXTRA_CRC: u8 = 243u8;
7428    const ENCODED_LEN: usize = 149usize;
7429    fn deser(
7430        _version: MavlinkVersion,
7431        __input: &[u8],
7432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7433        let avail_len = __input.len();
7434        let mut payload_buf = [0; Self::ENCODED_LEN];
7435        let mut buf = if avail_len < Self::ENCODED_LEN {
7436            payload_buf[0..avail_len].copy_from_slice(__input);
7437            Bytes::new(&payload_buf)
7438        } else {
7439            Bytes::new(__input)
7440        };
7441        let mut __struct = Self::default();
7442        __struct.param_count = buf.get_u16_le();
7443        __struct.param_index = buf.get_u16_le();
7444        for v in &mut __struct.param_id {
7445            let val = buf.get_u8();
7446            *v = val;
7447        }
7448        for v in &mut __struct.param_value {
7449            let val = buf.get_u8();
7450            *v = val;
7451        }
7452        let tmp = buf.get_u8();
7453        __struct.param_type =
7454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7455                enum_type: "MavParamExtType",
7456                value: tmp as u32,
7457            })?;
7458        Ok(__struct)
7459    }
7460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7461        let mut __tmp = BytesMut::new(bytes);
7462        #[allow(clippy::absurd_extreme_comparisons)]
7463        #[allow(unused_comparisons)]
7464        if __tmp.remaining() < Self::ENCODED_LEN {
7465            panic!(
7466                "buffer is too small (need {} bytes, but got {})",
7467                Self::ENCODED_LEN,
7468                __tmp.remaining(),
7469            )
7470        }
7471        __tmp.put_u16_le(self.param_count);
7472        __tmp.put_u16_le(self.param_index);
7473        for val in &self.param_id {
7474            __tmp.put_u8(*val);
7475        }
7476        for val in &self.param_value {
7477            __tmp.put_u8(*val);
7478        }
7479        __tmp.put_u8(self.param_type as u8);
7480        if matches!(version, MavlinkVersion::V2) {
7481            let len = __tmp.len();
7482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7483        } else {
7484            __tmp.len()
7485        }
7486    }
7487}
7488#[doc = "id: 111"]
7489#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
7490#[derive(Debug, Clone, PartialEq)]
7491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7493pub struct TIMESYNC_DATA {
7494    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
7495    pub tc1: i64,
7496    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
7497    pub ts1: i64,
7498    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
7499    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7500    pub target_system: u8,
7501    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
7502    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7503    pub target_component: u8,
7504}
7505impl TIMESYNC_DATA {
7506    pub const ENCODED_LEN: usize = 18usize;
7507    pub const DEFAULT: Self = Self {
7508        tc1: 0_i64,
7509        ts1: 0_i64,
7510        target_system: 0_u8,
7511        target_component: 0_u8,
7512    };
7513    #[cfg(feature = "arbitrary")]
7514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7515        use arbitrary::{Arbitrary, Unstructured};
7516        let mut buf = [0u8; 1024];
7517        rng.fill_bytes(&mut buf);
7518        let mut unstructured = Unstructured::new(&buf);
7519        Self::arbitrary(&mut unstructured).unwrap_or_default()
7520    }
7521}
7522impl Default for TIMESYNC_DATA {
7523    fn default() -> Self {
7524        Self::DEFAULT.clone()
7525    }
7526}
7527impl MessageData for TIMESYNC_DATA {
7528    type Message = MavMessage;
7529    const ID: u32 = 111u32;
7530    const NAME: &'static str = "TIMESYNC";
7531    const EXTRA_CRC: u8 = 34u8;
7532    const ENCODED_LEN: usize = 18usize;
7533    fn deser(
7534        _version: MavlinkVersion,
7535        __input: &[u8],
7536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7537        let avail_len = __input.len();
7538        let mut payload_buf = [0; Self::ENCODED_LEN];
7539        let mut buf = if avail_len < Self::ENCODED_LEN {
7540            payload_buf[0..avail_len].copy_from_slice(__input);
7541            Bytes::new(&payload_buf)
7542        } else {
7543            Bytes::new(__input)
7544        };
7545        let mut __struct = Self::default();
7546        __struct.tc1 = buf.get_i64_le();
7547        __struct.ts1 = buf.get_i64_le();
7548        __struct.target_system = buf.get_u8();
7549        __struct.target_component = buf.get_u8();
7550        Ok(__struct)
7551    }
7552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7553        let mut __tmp = BytesMut::new(bytes);
7554        #[allow(clippy::absurd_extreme_comparisons)]
7555        #[allow(unused_comparisons)]
7556        if __tmp.remaining() < Self::ENCODED_LEN {
7557            panic!(
7558                "buffer is too small (need {} bytes, but got {})",
7559                Self::ENCODED_LEN,
7560                __tmp.remaining(),
7561            )
7562        }
7563        __tmp.put_i64_le(self.tc1);
7564        __tmp.put_i64_le(self.ts1);
7565        __tmp.put_u8(self.target_system);
7566        __tmp.put_u8(self.target_component);
7567        if matches!(version, MavlinkVersion::V2) {
7568            let len = __tmp.len();
7569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7570        } else {
7571            __tmp.len()
7572        }
7573    }
7574}
7575#[doc = "id: 40"]
7576#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
7577#[derive(Debug, Clone, PartialEq)]
7578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7580pub struct MISSION_REQUEST_DATA {
7581    #[doc = "Sequence"]
7582    pub seq: u16,
7583    #[doc = "System ID"]
7584    pub target_system: u8,
7585    #[doc = "Component ID"]
7586    pub target_component: u8,
7587    #[doc = "Mission type."]
7588    #[cfg_attr(feature = "serde", serde(default))]
7589    pub mission_type: MavMissionType,
7590}
7591impl MISSION_REQUEST_DATA {
7592    pub const ENCODED_LEN: usize = 5usize;
7593    pub const DEFAULT: Self = Self {
7594        seq: 0_u16,
7595        target_system: 0_u8,
7596        target_component: 0_u8,
7597        mission_type: MavMissionType::DEFAULT,
7598    };
7599    #[cfg(feature = "arbitrary")]
7600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7601        use arbitrary::{Arbitrary, Unstructured};
7602        let mut buf = [0u8; 1024];
7603        rng.fill_bytes(&mut buf);
7604        let mut unstructured = Unstructured::new(&buf);
7605        Self::arbitrary(&mut unstructured).unwrap_or_default()
7606    }
7607}
7608impl Default for MISSION_REQUEST_DATA {
7609    fn default() -> Self {
7610        Self::DEFAULT.clone()
7611    }
7612}
7613impl MessageData for MISSION_REQUEST_DATA {
7614    type Message = MavMessage;
7615    const ID: u32 = 40u32;
7616    const NAME: &'static str = "MISSION_REQUEST";
7617    const EXTRA_CRC: u8 = 230u8;
7618    const ENCODED_LEN: usize = 5usize;
7619    fn deser(
7620        _version: MavlinkVersion,
7621        __input: &[u8],
7622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7623        let avail_len = __input.len();
7624        let mut payload_buf = [0; Self::ENCODED_LEN];
7625        let mut buf = if avail_len < Self::ENCODED_LEN {
7626            payload_buf[0..avail_len].copy_from_slice(__input);
7627            Bytes::new(&payload_buf)
7628        } else {
7629            Bytes::new(__input)
7630        };
7631        let mut __struct = Self::default();
7632        __struct.seq = buf.get_u16_le();
7633        __struct.target_system = buf.get_u8();
7634        __struct.target_component = buf.get_u8();
7635        let tmp = buf.get_u8();
7636        __struct.mission_type =
7637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7638                enum_type: "MavMissionType",
7639                value: tmp as u32,
7640            })?;
7641        Ok(__struct)
7642    }
7643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7644        let mut __tmp = BytesMut::new(bytes);
7645        #[allow(clippy::absurd_extreme_comparisons)]
7646        #[allow(unused_comparisons)]
7647        if __tmp.remaining() < Self::ENCODED_LEN {
7648            panic!(
7649                "buffer is too small (need {} bytes, but got {})",
7650                Self::ENCODED_LEN,
7651                __tmp.remaining(),
7652            )
7653        }
7654        __tmp.put_u16_le(self.seq);
7655        __tmp.put_u8(self.target_system);
7656        __tmp.put_u8(self.target_component);
7657        __tmp.put_u8(self.mission_type as u8);
7658        if matches!(version, MavlinkVersion::V2) {
7659            let len = __tmp.len();
7660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7661        } else {
7662            __tmp.len()
7663        }
7664    }
7665}
7666#[doc = "id: 8015"]
7667#[doc = "Status of the SatCom link."]
7668#[derive(Debug, Clone, PartialEq)]
7669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7671pub struct SATCOM_LINK_STATUS_DATA {
7672    #[doc = "Timestamp"]
7673    pub timestamp: u64,
7674    #[doc = "Timestamp of the last successful sbd session"]
7675    pub last_heartbeat: u64,
7676    #[doc = "Number of failed sessions"]
7677    pub failed_sessions: u16,
7678    #[doc = "Number of successful sessions"]
7679    pub successful_sessions: u16,
7680    #[doc = "Signal quality"]
7681    pub signal_quality: u8,
7682    #[doc = "Ring call pending"]
7683    pub ring_pending: u8,
7684    #[doc = "Transmission session pending"]
7685    pub tx_session_pending: u8,
7686    #[doc = "Receiving session pending"]
7687    pub rx_session_pending: u8,
7688}
7689impl SATCOM_LINK_STATUS_DATA {
7690    pub const ENCODED_LEN: usize = 24usize;
7691    pub const DEFAULT: Self = Self {
7692        timestamp: 0_u64,
7693        last_heartbeat: 0_u64,
7694        failed_sessions: 0_u16,
7695        successful_sessions: 0_u16,
7696        signal_quality: 0_u8,
7697        ring_pending: 0_u8,
7698        tx_session_pending: 0_u8,
7699        rx_session_pending: 0_u8,
7700    };
7701    #[cfg(feature = "arbitrary")]
7702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7703        use arbitrary::{Arbitrary, Unstructured};
7704        let mut buf = [0u8; 1024];
7705        rng.fill_bytes(&mut buf);
7706        let mut unstructured = Unstructured::new(&buf);
7707        Self::arbitrary(&mut unstructured).unwrap_or_default()
7708    }
7709}
7710impl Default for SATCOM_LINK_STATUS_DATA {
7711    fn default() -> Self {
7712        Self::DEFAULT.clone()
7713    }
7714}
7715impl MessageData for SATCOM_LINK_STATUS_DATA {
7716    type Message = MavMessage;
7717    const ID: u32 = 8015u32;
7718    const NAME: &'static str = "SATCOM_LINK_STATUS";
7719    const EXTRA_CRC: u8 = 23u8;
7720    const ENCODED_LEN: usize = 24usize;
7721    fn deser(
7722        _version: MavlinkVersion,
7723        __input: &[u8],
7724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7725        let avail_len = __input.len();
7726        let mut payload_buf = [0; Self::ENCODED_LEN];
7727        let mut buf = if avail_len < Self::ENCODED_LEN {
7728            payload_buf[0..avail_len].copy_from_slice(__input);
7729            Bytes::new(&payload_buf)
7730        } else {
7731            Bytes::new(__input)
7732        };
7733        let mut __struct = Self::default();
7734        __struct.timestamp = buf.get_u64_le();
7735        __struct.last_heartbeat = buf.get_u64_le();
7736        __struct.failed_sessions = buf.get_u16_le();
7737        __struct.successful_sessions = buf.get_u16_le();
7738        __struct.signal_quality = buf.get_u8();
7739        __struct.ring_pending = buf.get_u8();
7740        __struct.tx_session_pending = buf.get_u8();
7741        __struct.rx_session_pending = buf.get_u8();
7742        Ok(__struct)
7743    }
7744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7745        let mut __tmp = BytesMut::new(bytes);
7746        #[allow(clippy::absurd_extreme_comparisons)]
7747        #[allow(unused_comparisons)]
7748        if __tmp.remaining() < Self::ENCODED_LEN {
7749            panic!(
7750                "buffer is too small (need {} bytes, but got {})",
7751                Self::ENCODED_LEN,
7752                __tmp.remaining(),
7753            )
7754        }
7755        __tmp.put_u64_le(self.timestamp);
7756        __tmp.put_u64_le(self.last_heartbeat);
7757        __tmp.put_u16_le(self.failed_sessions);
7758        __tmp.put_u16_le(self.successful_sessions);
7759        __tmp.put_u8(self.signal_quality);
7760        __tmp.put_u8(self.ring_pending);
7761        __tmp.put_u8(self.tx_session_pending);
7762        __tmp.put_u8(self.rx_session_pending);
7763        if matches!(version, MavlinkVersion::V2) {
7764            let len = __tmp.len();
7765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7766        } else {
7767            __tmp.len()
7768        }
7769    }
7770}
7771#[doc = "id: 112"]
7772#[doc = "Camera-IMU triggering and synchronisation message."]
7773#[derive(Debug, Clone, PartialEq)]
7774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7776pub struct CAMERA_TRIGGER_DATA {
7777    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7778    pub time_usec: u64,
7779    #[doc = "Image frame sequence"]
7780    pub seq: u32,
7781}
7782impl CAMERA_TRIGGER_DATA {
7783    pub const ENCODED_LEN: usize = 12usize;
7784    pub const DEFAULT: Self = Self {
7785        time_usec: 0_u64,
7786        seq: 0_u32,
7787    };
7788    #[cfg(feature = "arbitrary")]
7789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7790        use arbitrary::{Arbitrary, Unstructured};
7791        let mut buf = [0u8; 1024];
7792        rng.fill_bytes(&mut buf);
7793        let mut unstructured = Unstructured::new(&buf);
7794        Self::arbitrary(&mut unstructured).unwrap_or_default()
7795    }
7796}
7797impl Default for CAMERA_TRIGGER_DATA {
7798    fn default() -> Self {
7799        Self::DEFAULT.clone()
7800    }
7801}
7802impl MessageData for CAMERA_TRIGGER_DATA {
7803    type Message = MavMessage;
7804    const ID: u32 = 112u32;
7805    const NAME: &'static str = "CAMERA_TRIGGER";
7806    const EXTRA_CRC: u8 = 174u8;
7807    const ENCODED_LEN: usize = 12usize;
7808    fn deser(
7809        _version: MavlinkVersion,
7810        __input: &[u8],
7811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7812        let avail_len = __input.len();
7813        let mut payload_buf = [0; Self::ENCODED_LEN];
7814        let mut buf = if avail_len < Self::ENCODED_LEN {
7815            payload_buf[0..avail_len].copy_from_slice(__input);
7816            Bytes::new(&payload_buf)
7817        } else {
7818            Bytes::new(__input)
7819        };
7820        let mut __struct = Self::default();
7821        __struct.time_usec = buf.get_u64_le();
7822        __struct.seq = buf.get_u32_le();
7823        Ok(__struct)
7824    }
7825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7826        let mut __tmp = BytesMut::new(bytes);
7827        #[allow(clippy::absurd_extreme_comparisons)]
7828        #[allow(unused_comparisons)]
7829        if __tmp.remaining() < Self::ENCODED_LEN {
7830            panic!(
7831                "buffer is too small (need {} bytes, but got {})",
7832                Self::ENCODED_LEN,
7833                __tmp.remaining(),
7834            )
7835        }
7836        __tmp.put_u64_le(self.time_usec);
7837        __tmp.put_u32_le(self.seq);
7838        if matches!(version, MavlinkVersion::V2) {
7839            let len = __tmp.len();
7840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7841        } else {
7842            __tmp.len()
7843        }
7844    }
7845}
7846#[doc = "id: 277"]
7847#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7848#[derive(Debug, Clone, PartialEq)]
7849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7851pub struct CAMERA_THERMAL_RANGE_DATA {
7852    #[doc = "Timestamp (time since system boot)."]
7853    pub time_boot_ms: u32,
7854    #[doc = "Temperature max."]
7855    pub max: f32,
7856    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7857    pub max_point_x: f32,
7858    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7859    pub max_point_y: f32,
7860    #[doc = "Temperature min."]
7861    pub min: f32,
7862    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7863    pub min_point_x: f32,
7864    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7865    pub min_point_y: f32,
7866    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7867    pub stream_id: u8,
7868    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7869    pub camera_device_id: u8,
7870}
7871impl CAMERA_THERMAL_RANGE_DATA {
7872    pub const ENCODED_LEN: usize = 30usize;
7873    pub const DEFAULT: Self = Self {
7874        time_boot_ms: 0_u32,
7875        max: 0.0_f32,
7876        max_point_x: 0.0_f32,
7877        max_point_y: 0.0_f32,
7878        min: 0.0_f32,
7879        min_point_x: 0.0_f32,
7880        min_point_y: 0.0_f32,
7881        stream_id: 0_u8,
7882        camera_device_id: 0_u8,
7883    };
7884    #[cfg(feature = "arbitrary")]
7885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7886        use arbitrary::{Arbitrary, Unstructured};
7887        let mut buf = [0u8; 1024];
7888        rng.fill_bytes(&mut buf);
7889        let mut unstructured = Unstructured::new(&buf);
7890        Self::arbitrary(&mut unstructured).unwrap_or_default()
7891    }
7892}
7893impl Default for CAMERA_THERMAL_RANGE_DATA {
7894    fn default() -> Self {
7895        Self::DEFAULT.clone()
7896    }
7897}
7898impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7899    type Message = MavMessage;
7900    const ID: u32 = 277u32;
7901    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7902    const EXTRA_CRC: u8 = 62u8;
7903    const ENCODED_LEN: usize = 30usize;
7904    fn deser(
7905        _version: MavlinkVersion,
7906        __input: &[u8],
7907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7908        let avail_len = __input.len();
7909        let mut payload_buf = [0; Self::ENCODED_LEN];
7910        let mut buf = if avail_len < Self::ENCODED_LEN {
7911            payload_buf[0..avail_len].copy_from_slice(__input);
7912            Bytes::new(&payload_buf)
7913        } else {
7914            Bytes::new(__input)
7915        };
7916        let mut __struct = Self::default();
7917        __struct.time_boot_ms = buf.get_u32_le();
7918        __struct.max = buf.get_f32_le();
7919        __struct.max_point_x = buf.get_f32_le();
7920        __struct.max_point_y = buf.get_f32_le();
7921        __struct.min = buf.get_f32_le();
7922        __struct.min_point_x = buf.get_f32_le();
7923        __struct.min_point_y = buf.get_f32_le();
7924        __struct.stream_id = buf.get_u8();
7925        __struct.camera_device_id = buf.get_u8();
7926        Ok(__struct)
7927    }
7928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7929        let mut __tmp = BytesMut::new(bytes);
7930        #[allow(clippy::absurd_extreme_comparisons)]
7931        #[allow(unused_comparisons)]
7932        if __tmp.remaining() < Self::ENCODED_LEN {
7933            panic!(
7934                "buffer is too small (need {} bytes, but got {})",
7935                Self::ENCODED_LEN,
7936                __tmp.remaining(),
7937            )
7938        }
7939        __tmp.put_u32_le(self.time_boot_ms);
7940        __tmp.put_f32_le(self.max);
7941        __tmp.put_f32_le(self.max_point_x);
7942        __tmp.put_f32_le(self.max_point_y);
7943        __tmp.put_f32_le(self.min);
7944        __tmp.put_f32_le(self.min_point_x);
7945        __tmp.put_f32_le(self.min_point_y);
7946        __tmp.put_u8(self.stream_id);
7947        __tmp.put_u8(self.camera_device_id);
7948        if matches!(version, MavlinkVersion::V2) {
7949            let len = __tmp.len();
7950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7951        } else {
7952            __tmp.len()
7953        }
7954    }
7955}
7956#[doc = "id: 140"]
7957#[doc = "Set the vehicle attitude and body angular rates."]
7958#[derive(Debug, Clone, PartialEq)]
7959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7961pub struct ACTUATOR_CONTROL_TARGET_DATA {
7962    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7963    pub time_usec: u64,
7964    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
7965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7966    pub controls: [f32; 8],
7967    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
7968    pub group_mlx: u8,
7969}
7970impl ACTUATOR_CONTROL_TARGET_DATA {
7971    pub const ENCODED_LEN: usize = 41usize;
7972    pub const DEFAULT: Self = Self {
7973        time_usec: 0_u64,
7974        controls: [0.0_f32; 8usize],
7975        group_mlx: 0_u8,
7976    };
7977    #[cfg(feature = "arbitrary")]
7978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7979        use arbitrary::{Arbitrary, Unstructured};
7980        let mut buf = [0u8; 1024];
7981        rng.fill_bytes(&mut buf);
7982        let mut unstructured = Unstructured::new(&buf);
7983        Self::arbitrary(&mut unstructured).unwrap_or_default()
7984    }
7985}
7986impl Default for ACTUATOR_CONTROL_TARGET_DATA {
7987    fn default() -> Self {
7988        Self::DEFAULT.clone()
7989    }
7990}
7991impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
7992    type Message = MavMessage;
7993    const ID: u32 = 140u32;
7994    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
7995    const EXTRA_CRC: u8 = 181u8;
7996    const ENCODED_LEN: usize = 41usize;
7997    fn deser(
7998        _version: MavlinkVersion,
7999        __input: &[u8],
8000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8001        let avail_len = __input.len();
8002        let mut payload_buf = [0; Self::ENCODED_LEN];
8003        let mut buf = if avail_len < Self::ENCODED_LEN {
8004            payload_buf[0..avail_len].copy_from_slice(__input);
8005            Bytes::new(&payload_buf)
8006        } else {
8007            Bytes::new(__input)
8008        };
8009        let mut __struct = Self::default();
8010        __struct.time_usec = buf.get_u64_le();
8011        for v in &mut __struct.controls {
8012            let val = buf.get_f32_le();
8013            *v = val;
8014        }
8015        __struct.group_mlx = buf.get_u8();
8016        Ok(__struct)
8017    }
8018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8019        let mut __tmp = BytesMut::new(bytes);
8020        #[allow(clippy::absurd_extreme_comparisons)]
8021        #[allow(unused_comparisons)]
8022        if __tmp.remaining() < Self::ENCODED_LEN {
8023            panic!(
8024                "buffer is too small (need {} bytes, but got {})",
8025                Self::ENCODED_LEN,
8026                __tmp.remaining(),
8027            )
8028        }
8029        __tmp.put_u64_le(self.time_usec);
8030        for val in &self.controls {
8031            __tmp.put_f32_le(*val);
8032        }
8033        __tmp.put_u8(self.group_mlx);
8034        if matches!(version, MavlinkVersion::V2) {
8035            let len = __tmp.len();
8036            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8037        } else {
8038            __tmp.len()
8039        }
8040    }
8041}
8042#[doc = "id: 66"]
8043#[doc = "Request a data stream."]
8044#[derive(Debug, Clone, PartialEq)]
8045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8047pub struct REQUEST_DATA_STREAM_DATA {
8048    #[doc = "The requested message rate"]
8049    pub req_message_rate: u16,
8050    #[doc = "The target requested to send the message stream."]
8051    pub target_system: u8,
8052    #[doc = "The target requested to send the message stream."]
8053    pub target_component: u8,
8054    #[doc = "The ID of the requested data stream"]
8055    pub req_stream_id: u8,
8056    #[doc = "1 to start sending, 0 to stop sending."]
8057    pub start_stop: u8,
8058}
8059impl REQUEST_DATA_STREAM_DATA {
8060    pub const ENCODED_LEN: usize = 6usize;
8061    pub const DEFAULT: Self = Self {
8062        req_message_rate: 0_u16,
8063        target_system: 0_u8,
8064        target_component: 0_u8,
8065        req_stream_id: 0_u8,
8066        start_stop: 0_u8,
8067    };
8068    #[cfg(feature = "arbitrary")]
8069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8070        use arbitrary::{Arbitrary, Unstructured};
8071        let mut buf = [0u8; 1024];
8072        rng.fill_bytes(&mut buf);
8073        let mut unstructured = Unstructured::new(&buf);
8074        Self::arbitrary(&mut unstructured).unwrap_or_default()
8075    }
8076}
8077impl Default for REQUEST_DATA_STREAM_DATA {
8078    fn default() -> Self {
8079        Self::DEFAULT.clone()
8080    }
8081}
8082impl MessageData for REQUEST_DATA_STREAM_DATA {
8083    type Message = MavMessage;
8084    const ID: u32 = 66u32;
8085    const NAME: &'static str = "REQUEST_DATA_STREAM";
8086    const EXTRA_CRC: u8 = 148u8;
8087    const ENCODED_LEN: usize = 6usize;
8088    fn deser(
8089        _version: MavlinkVersion,
8090        __input: &[u8],
8091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8092        let avail_len = __input.len();
8093        let mut payload_buf = [0; Self::ENCODED_LEN];
8094        let mut buf = if avail_len < Self::ENCODED_LEN {
8095            payload_buf[0..avail_len].copy_from_slice(__input);
8096            Bytes::new(&payload_buf)
8097        } else {
8098            Bytes::new(__input)
8099        };
8100        let mut __struct = Self::default();
8101        __struct.req_message_rate = buf.get_u16_le();
8102        __struct.target_system = buf.get_u8();
8103        __struct.target_component = buf.get_u8();
8104        __struct.req_stream_id = buf.get_u8();
8105        __struct.start_stop = buf.get_u8();
8106        Ok(__struct)
8107    }
8108    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8109        let mut __tmp = BytesMut::new(bytes);
8110        #[allow(clippy::absurd_extreme_comparisons)]
8111        #[allow(unused_comparisons)]
8112        if __tmp.remaining() < Self::ENCODED_LEN {
8113            panic!(
8114                "buffer is too small (need {} bytes, but got {})",
8115                Self::ENCODED_LEN,
8116                __tmp.remaining(),
8117            )
8118        }
8119        __tmp.put_u16_le(self.req_message_rate);
8120        __tmp.put_u8(self.target_system);
8121        __tmp.put_u8(self.target_component);
8122        __tmp.put_u8(self.req_stream_id);
8123        __tmp.put_u8(self.start_stop);
8124        if matches!(version, MavlinkVersion::V2) {
8125            let len = __tmp.len();
8126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8127        } else {
8128            __tmp.len()
8129        }
8130    }
8131}
8132#[doc = "id: 435"]
8133#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
8134#[derive(Debug, Clone, PartialEq)]
8135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8137pub struct AVAILABLE_MODES_DATA {
8138    #[doc = "A bitfield for use for autopilot-specific flags"]
8139    pub custom_mode: u32,
8140    #[doc = "Mode properties."]
8141    pub properties: MavModeProperty,
8142    #[doc = "The total number of available modes for the current vehicle type."]
8143    pub number_modes: u8,
8144    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
8145    pub mode_index: u8,
8146    #[doc = "Standard mode."]
8147    pub standard_mode: MavStandardMode,
8148    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
8149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8150    pub mode_name: [u8; 35],
8151}
8152impl AVAILABLE_MODES_DATA {
8153    pub const ENCODED_LEN: usize = 46usize;
8154    pub const DEFAULT: Self = Self {
8155        custom_mode: 0_u32,
8156        properties: MavModeProperty::DEFAULT,
8157        number_modes: 0_u8,
8158        mode_index: 0_u8,
8159        standard_mode: MavStandardMode::DEFAULT,
8160        mode_name: [0_u8; 35usize],
8161    };
8162    #[cfg(feature = "arbitrary")]
8163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8164        use arbitrary::{Arbitrary, Unstructured};
8165        let mut buf = [0u8; 1024];
8166        rng.fill_bytes(&mut buf);
8167        let mut unstructured = Unstructured::new(&buf);
8168        Self::arbitrary(&mut unstructured).unwrap_or_default()
8169    }
8170}
8171impl Default for AVAILABLE_MODES_DATA {
8172    fn default() -> Self {
8173        Self::DEFAULT.clone()
8174    }
8175}
8176impl MessageData for AVAILABLE_MODES_DATA {
8177    type Message = MavMessage;
8178    const ID: u32 = 435u32;
8179    const NAME: &'static str = "AVAILABLE_MODES";
8180    const EXTRA_CRC: u8 = 134u8;
8181    const ENCODED_LEN: usize = 46usize;
8182    fn deser(
8183        _version: MavlinkVersion,
8184        __input: &[u8],
8185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8186        let avail_len = __input.len();
8187        let mut payload_buf = [0; Self::ENCODED_LEN];
8188        let mut buf = if avail_len < Self::ENCODED_LEN {
8189            payload_buf[0..avail_len].copy_from_slice(__input);
8190            Bytes::new(&payload_buf)
8191        } else {
8192            Bytes::new(__input)
8193        };
8194        let mut __struct = Self::default();
8195        __struct.custom_mode = buf.get_u32_le();
8196        let tmp = buf.get_u32_le();
8197        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
8198            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8199                flag_type: "MavModeProperty",
8200                value: tmp as u32,
8201            })?;
8202        __struct.number_modes = buf.get_u8();
8203        __struct.mode_index = buf.get_u8();
8204        let tmp = buf.get_u8();
8205        __struct.standard_mode =
8206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8207                enum_type: "MavStandardMode",
8208                value: tmp as u32,
8209            })?;
8210        for v in &mut __struct.mode_name {
8211            let val = buf.get_u8();
8212            *v = val;
8213        }
8214        Ok(__struct)
8215    }
8216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8217        let mut __tmp = BytesMut::new(bytes);
8218        #[allow(clippy::absurd_extreme_comparisons)]
8219        #[allow(unused_comparisons)]
8220        if __tmp.remaining() < Self::ENCODED_LEN {
8221            panic!(
8222                "buffer is too small (need {} bytes, but got {})",
8223                Self::ENCODED_LEN,
8224                __tmp.remaining(),
8225            )
8226        }
8227        __tmp.put_u32_le(self.custom_mode);
8228        __tmp.put_u32_le(self.properties.bits());
8229        __tmp.put_u8(self.number_modes);
8230        __tmp.put_u8(self.mode_index);
8231        __tmp.put_u8(self.standard_mode as u8);
8232        for val in &self.mode_name {
8233            __tmp.put_u8(*val);
8234        }
8235        if matches!(version, MavlinkVersion::V2) {
8236            let len = __tmp.len();
8237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8238        } else {
8239            __tmp.len()
8240        }
8241    }
8242}
8243#[doc = "id: 118"]
8244#[doc = "Reply to LOG_REQUEST_LIST."]
8245#[derive(Debug, Clone, PartialEq)]
8246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8248pub struct LOG_ENTRY_DATA {
8249    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
8250    pub time_utc: u32,
8251    #[doc = "Size of the log (may be approximate)"]
8252    pub size: u32,
8253    #[doc = "Log id"]
8254    pub id: u16,
8255    #[doc = "Total number of logs"]
8256    pub num_logs: u16,
8257    #[doc = "High log number"]
8258    pub last_log_num: u16,
8259}
8260impl LOG_ENTRY_DATA {
8261    pub const ENCODED_LEN: usize = 14usize;
8262    pub const DEFAULT: Self = Self {
8263        time_utc: 0_u32,
8264        size: 0_u32,
8265        id: 0_u16,
8266        num_logs: 0_u16,
8267        last_log_num: 0_u16,
8268    };
8269    #[cfg(feature = "arbitrary")]
8270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8271        use arbitrary::{Arbitrary, Unstructured};
8272        let mut buf = [0u8; 1024];
8273        rng.fill_bytes(&mut buf);
8274        let mut unstructured = Unstructured::new(&buf);
8275        Self::arbitrary(&mut unstructured).unwrap_or_default()
8276    }
8277}
8278impl Default for LOG_ENTRY_DATA {
8279    fn default() -> Self {
8280        Self::DEFAULT.clone()
8281    }
8282}
8283impl MessageData for LOG_ENTRY_DATA {
8284    type Message = MavMessage;
8285    const ID: u32 = 118u32;
8286    const NAME: &'static str = "LOG_ENTRY";
8287    const EXTRA_CRC: u8 = 56u8;
8288    const ENCODED_LEN: usize = 14usize;
8289    fn deser(
8290        _version: MavlinkVersion,
8291        __input: &[u8],
8292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8293        let avail_len = __input.len();
8294        let mut payload_buf = [0; Self::ENCODED_LEN];
8295        let mut buf = if avail_len < Self::ENCODED_LEN {
8296            payload_buf[0..avail_len].copy_from_slice(__input);
8297            Bytes::new(&payload_buf)
8298        } else {
8299            Bytes::new(__input)
8300        };
8301        let mut __struct = Self::default();
8302        __struct.time_utc = buf.get_u32_le();
8303        __struct.size = buf.get_u32_le();
8304        __struct.id = buf.get_u16_le();
8305        __struct.num_logs = buf.get_u16_le();
8306        __struct.last_log_num = buf.get_u16_le();
8307        Ok(__struct)
8308    }
8309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8310        let mut __tmp = BytesMut::new(bytes);
8311        #[allow(clippy::absurd_extreme_comparisons)]
8312        #[allow(unused_comparisons)]
8313        if __tmp.remaining() < Self::ENCODED_LEN {
8314            panic!(
8315                "buffer is too small (need {} bytes, but got {})",
8316                Self::ENCODED_LEN,
8317                __tmp.remaining(),
8318            )
8319        }
8320        __tmp.put_u32_le(self.time_utc);
8321        __tmp.put_u32_le(self.size);
8322        __tmp.put_u16_le(self.id);
8323        __tmp.put_u16_le(self.num_logs);
8324        __tmp.put_u16_le(self.last_log_num);
8325        if matches!(version, MavlinkVersion::V2) {
8326            let len = __tmp.len();
8327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8328        } else {
8329            __tmp.len()
8330        }
8331    }
8332}
8333#[doc = "id: 73"]
8334#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
8335#[derive(Debug, Clone, PartialEq)]
8336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8338pub struct MISSION_ITEM_INT_DATA {
8339    #[doc = "PARAM1, see MAV_CMD enum"]
8340    pub param1: f32,
8341    #[doc = "PARAM2, see MAV_CMD enum"]
8342    pub param2: f32,
8343    #[doc = "PARAM3, see MAV_CMD enum"]
8344    pub param3: f32,
8345    #[doc = "PARAM4, see MAV_CMD enum"]
8346    pub param4: f32,
8347    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8348    pub x: i32,
8349    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
8350    pub y: i32,
8351    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
8352    pub z: f32,
8353    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
8354    pub seq: u16,
8355    #[doc = "The scheduled action for the waypoint."]
8356    pub command: MavCmd,
8357    #[doc = "System ID"]
8358    pub target_system: u8,
8359    #[doc = "Component ID"]
8360    pub target_component: u8,
8361    #[doc = "The coordinate system of the waypoint."]
8362    pub frame: MavFrame,
8363    #[doc = "false:0, true:1"]
8364    pub current: u8,
8365    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
8366    pub autocontinue: u8,
8367    #[doc = "Mission type."]
8368    #[cfg_attr(feature = "serde", serde(default))]
8369    pub mission_type: MavMissionType,
8370}
8371impl MISSION_ITEM_INT_DATA {
8372    pub const ENCODED_LEN: usize = 38usize;
8373    pub const DEFAULT: Self = Self {
8374        param1: 0.0_f32,
8375        param2: 0.0_f32,
8376        param3: 0.0_f32,
8377        param4: 0.0_f32,
8378        x: 0_i32,
8379        y: 0_i32,
8380        z: 0.0_f32,
8381        seq: 0_u16,
8382        command: MavCmd::DEFAULT,
8383        target_system: 0_u8,
8384        target_component: 0_u8,
8385        frame: MavFrame::DEFAULT,
8386        current: 0_u8,
8387        autocontinue: 0_u8,
8388        mission_type: MavMissionType::DEFAULT,
8389    };
8390    #[cfg(feature = "arbitrary")]
8391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8392        use arbitrary::{Arbitrary, Unstructured};
8393        let mut buf = [0u8; 1024];
8394        rng.fill_bytes(&mut buf);
8395        let mut unstructured = Unstructured::new(&buf);
8396        Self::arbitrary(&mut unstructured).unwrap_or_default()
8397    }
8398}
8399impl Default for MISSION_ITEM_INT_DATA {
8400    fn default() -> Self {
8401        Self::DEFAULT.clone()
8402    }
8403}
8404impl MessageData for MISSION_ITEM_INT_DATA {
8405    type Message = MavMessage;
8406    const ID: u32 = 73u32;
8407    const NAME: &'static str = "MISSION_ITEM_INT";
8408    const EXTRA_CRC: u8 = 38u8;
8409    const ENCODED_LEN: usize = 38usize;
8410    fn deser(
8411        _version: MavlinkVersion,
8412        __input: &[u8],
8413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8414        let avail_len = __input.len();
8415        let mut payload_buf = [0; Self::ENCODED_LEN];
8416        let mut buf = if avail_len < Self::ENCODED_LEN {
8417            payload_buf[0..avail_len].copy_from_slice(__input);
8418            Bytes::new(&payload_buf)
8419        } else {
8420            Bytes::new(__input)
8421        };
8422        let mut __struct = Self::default();
8423        __struct.param1 = buf.get_f32_le();
8424        __struct.param2 = buf.get_f32_le();
8425        __struct.param3 = buf.get_f32_le();
8426        __struct.param4 = buf.get_f32_le();
8427        __struct.x = buf.get_i32_le();
8428        __struct.y = buf.get_i32_le();
8429        __struct.z = buf.get_f32_le();
8430        __struct.seq = buf.get_u16_le();
8431        let tmp = buf.get_u16_le();
8432        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8433            ::mavlink_core::error::ParserError::InvalidEnum {
8434                enum_type: "MavCmd",
8435                value: tmp as u32,
8436            },
8437        )?;
8438        __struct.target_system = buf.get_u8();
8439        __struct.target_component = buf.get_u8();
8440        let tmp = buf.get_u8();
8441        __struct.frame =
8442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8443                enum_type: "MavFrame",
8444                value: tmp as u32,
8445            })?;
8446        __struct.current = buf.get_u8();
8447        __struct.autocontinue = buf.get_u8();
8448        let tmp = buf.get_u8();
8449        __struct.mission_type =
8450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8451                enum_type: "MavMissionType",
8452                value: tmp as u32,
8453            })?;
8454        Ok(__struct)
8455    }
8456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8457        let mut __tmp = BytesMut::new(bytes);
8458        #[allow(clippy::absurd_extreme_comparisons)]
8459        #[allow(unused_comparisons)]
8460        if __tmp.remaining() < Self::ENCODED_LEN {
8461            panic!(
8462                "buffer is too small (need {} bytes, but got {})",
8463                Self::ENCODED_LEN,
8464                __tmp.remaining(),
8465            )
8466        }
8467        __tmp.put_f32_le(self.param1);
8468        __tmp.put_f32_le(self.param2);
8469        __tmp.put_f32_le(self.param3);
8470        __tmp.put_f32_le(self.param4);
8471        __tmp.put_i32_le(self.x);
8472        __tmp.put_i32_le(self.y);
8473        __tmp.put_f32_le(self.z);
8474        __tmp.put_u16_le(self.seq);
8475        __tmp.put_u16_le(self.command as u16);
8476        __tmp.put_u8(self.target_system);
8477        __tmp.put_u8(self.target_component);
8478        __tmp.put_u8(self.frame as u8);
8479        __tmp.put_u8(self.current);
8480        __tmp.put_u8(self.autocontinue);
8481        __tmp.put_u8(self.mission_type as u8);
8482        if matches!(version, MavlinkVersion::V2) {
8483            let len = __tmp.len();
8484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8485        } else {
8486            __tmp.len()
8487        }
8488    }
8489}
8490#[doc = "id: 8002"]
8491#[doc = "Voltage and current sensor data."]
8492#[derive(Debug, Clone, PartialEq)]
8493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8495pub struct SENS_POWER_DATA {
8496    #[doc = "Power board voltage sensor reading"]
8497    pub adc121_vspb_volt: f32,
8498    #[doc = "Power board current sensor reading"]
8499    pub adc121_cspb_amp: f32,
8500    #[doc = "Board current sensor 1 reading"]
8501    pub adc121_cs1_amp: f32,
8502    #[doc = "Board current sensor 2 reading"]
8503    pub adc121_cs2_amp: f32,
8504}
8505impl SENS_POWER_DATA {
8506    pub const ENCODED_LEN: usize = 16usize;
8507    pub const DEFAULT: Self = Self {
8508        adc121_vspb_volt: 0.0_f32,
8509        adc121_cspb_amp: 0.0_f32,
8510        adc121_cs1_amp: 0.0_f32,
8511        adc121_cs2_amp: 0.0_f32,
8512    };
8513    #[cfg(feature = "arbitrary")]
8514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8515        use arbitrary::{Arbitrary, Unstructured};
8516        let mut buf = [0u8; 1024];
8517        rng.fill_bytes(&mut buf);
8518        let mut unstructured = Unstructured::new(&buf);
8519        Self::arbitrary(&mut unstructured).unwrap_or_default()
8520    }
8521}
8522impl Default for SENS_POWER_DATA {
8523    fn default() -> Self {
8524        Self::DEFAULT.clone()
8525    }
8526}
8527impl MessageData for SENS_POWER_DATA {
8528    type Message = MavMessage;
8529    const ID: u32 = 8002u32;
8530    const NAME: &'static str = "SENS_POWER";
8531    const EXTRA_CRC: u8 = 218u8;
8532    const ENCODED_LEN: usize = 16usize;
8533    fn deser(
8534        _version: MavlinkVersion,
8535        __input: &[u8],
8536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8537        let avail_len = __input.len();
8538        let mut payload_buf = [0; Self::ENCODED_LEN];
8539        let mut buf = if avail_len < Self::ENCODED_LEN {
8540            payload_buf[0..avail_len].copy_from_slice(__input);
8541            Bytes::new(&payload_buf)
8542        } else {
8543            Bytes::new(__input)
8544        };
8545        let mut __struct = Self::default();
8546        __struct.adc121_vspb_volt = buf.get_f32_le();
8547        __struct.adc121_cspb_amp = buf.get_f32_le();
8548        __struct.adc121_cs1_amp = buf.get_f32_le();
8549        __struct.adc121_cs2_amp = buf.get_f32_le();
8550        Ok(__struct)
8551    }
8552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8553        let mut __tmp = BytesMut::new(bytes);
8554        #[allow(clippy::absurd_extreme_comparisons)]
8555        #[allow(unused_comparisons)]
8556        if __tmp.remaining() < Self::ENCODED_LEN {
8557            panic!(
8558                "buffer is too small (need {} bytes, but got {})",
8559                Self::ENCODED_LEN,
8560                __tmp.remaining(),
8561            )
8562        }
8563        __tmp.put_f32_le(self.adc121_vspb_volt);
8564        __tmp.put_f32_le(self.adc121_cspb_amp);
8565        __tmp.put_f32_le(self.adc121_cs1_amp);
8566        __tmp.put_f32_le(self.adc121_cs2_amp);
8567        if matches!(version, MavlinkVersion::V2) {
8568            let len = __tmp.len();
8569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8570        } else {
8571            __tmp.len()
8572        }
8573    }
8574}
8575#[doc = "id: 260"]
8576#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8577#[derive(Debug, Clone, PartialEq)]
8578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8580pub struct CAMERA_SETTINGS_DATA {
8581    #[doc = "Timestamp (time since system boot)."]
8582    pub time_boot_ms: u32,
8583    #[doc = "Camera mode"]
8584    pub mode_id: CameraMode,
8585    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8587    pub zoomLevel: f32,
8588    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8590    pub focusLevel: f32,
8591    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8593    pub camera_device_id: u8,
8594}
8595impl CAMERA_SETTINGS_DATA {
8596    pub const ENCODED_LEN: usize = 14usize;
8597    pub const DEFAULT: Self = Self {
8598        time_boot_ms: 0_u32,
8599        mode_id: CameraMode::DEFAULT,
8600        zoomLevel: 0.0_f32,
8601        focusLevel: 0.0_f32,
8602        camera_device_id: 0_u8,
8603    };
8604    #[cfg(feature = "arbitrary")]
8605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8606        use arbitrary::{Arbitrary, Unstructured};
8607        let mut buf = [0u8; 1024];
8608        rng.fill_bytes(&mut buf);
8609        let mut unstructured = Unstructured::new(&buf);
8610        Self::arbitrary(&mut unstructured).unwrap_or_default()
8611    }
8612}
8613impl Default for CAMERA_SETTINGS_DATA {
8614    fn default() -> Self {
8615        Self::DEFAULT.clone()
8616    }
8617}
8618impl MessageData for CAMERA_SETTINGS_DATA {
8619    type Message = MavMessage;
8620    const ID: u32 = 260u32;
8621    const NAME: &'static str = "CAMERA_SETTINGS";
8622    const EXTRA_CRC: u8 = 146u8;
8623    const ENCODED_LEN: usize = 14usize;
8624    fn deser(
8625        _version: MavlinkVersion,
8626        __input: &[u8],
8627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8628        let avail_len = __input.len();
8629        let mut payload_buf = [0; Self::ENCODED_LEN];
8630        let mut buf = if avail_len < Self::ENCODED_LEN {
8631            payload_buf[0..avail_len].copy_from_slice(__input);
8632            Bytes::new(&payload_buf)
8633        } else {
8634            Bytes::new(__input)
8635        };
8636        let mut __struct = Self::default();
8637        __struct.time_boot_ms = buf.get_u32_le();
8638        let tmp = buf.get_u8();
8639        __struct.mode_id =
8640            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8641                enum_type: "CameraMode",
8642                value: tmp as u32,
8643            })?;
8644        __struct.zoomLevel = buf.get_f32_le();
8645        __struct.focusLevel = buf.get_f32_le();
8646        __struct.camera_device_id = buf.get_u8();
8647        Ok(__struct)
8648    }
8649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8650        let mut __tmp = BytesMut::new(bytes);
8651        #[allow(clippy::absurd_extreme_comparisons)]
8652        #[allow(unused_comparisons)]
8653        if __tmp.remaining() < Self::ENCODED_LEN {
8654            panic!(
8655                "buffer is too small (need {} bytes, but got {})",
8656                Self::ENCODED_LEN,
8657                __tmp.remaining(),
8658            )
8659        }
8660        __tmp.put_u32_le(self.time_boot_ms);
8661        __tmp.put_u8(self.mode_id as u8);
8662        __tmp.put_f32_le(self.zoomLevel);
8663        __tmp.put_f32_le(self.focusLevel);
8664        __tmp.put_u8(self.camera_device_id);
8665        if matches!(version, MavlinkVersion::V2) {
8666            let len = __tmp.len();
8667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8668        } else {
8669            __tmp.len()
8670        }
8671    }
8672}
8673#[doc = "id: 124"]
8674#[doc = "Second GPS data."]
8675#[derive(Debug, Clone, PartialEq)]
8676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8678pub struct GPS2_RAW_DATA {
8679    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8680    pub time_usec: u64,
8681    #[doc = "Latitude (WGS84)"]
8682    pub lat: i32,
8683    #[doc = "Longitude (WGS84)"]
8684    pub lon: i32,
8685    #[doc = "Altitude (MSL). Positive for up."]
8686    pub alt: i32,
8687    #[doc = "Age of DGPS info"]
8688    pub dgps_age: u32,
8689    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
8690    pub eph: u16,
8691    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
8692    pub epv: u16,
8693    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
8694    pub vel: u16,
8695    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
8696    pub cog: u16,
8697    #[doc = "GPS fix type."]
8698    pub fix_type: GpsFixType,
8699    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
8700    pub satellites_visible: u8,
8701    #[doc = "Number of DGPS satellites"]
8702    pub dgps_numch: u8,
8703    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
8704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8705    pub yaw: u16,
8706    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
8707    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8708    pub alt_ellipsoid: i32,
8709    #[doc = "Position uncertainty."]
8710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8711    pub h_acc: u32,
8712    #[doc = "Altitude uncertainty."]
8713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8714    pub v_acc: u32,
8715    #[doc = "Speed uncertainty."]
8716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8717    pub vel_acc: u32,
8718    #[doc = "Heading / track uncertainty"]
8719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8720    pub hdg_acc: u32,
8721}
8722impl GPS2_RAW_DATA {
8723    pub const ENCODED_LEN: usize = 57usize;
8724    pub const DEFAULT: Self = Self {
8725        time_usec: 0_u64,
8726        lat: 0_i32,
8727        lon: 0_i32,
8728        alt: 0_i32,
8729        dgps_age: 0_u32,
8730        eph: 0_u16,
8731        epv: 0_u16,
8732        vel: 0_u16,
8733        cog: 0_u16,
8734        fix_type: GpsFixType::DEFAULT,
8735        satellites_visible: 0_u8,
8736        dgps_numch: 0_u8,
8737        yaw: 0_u16,
8738        alt_ellipsoid: 0_i32,
8739        h_acc: 0_u32,
8740        v_acc: 0_u32,
8741        vel_acc: 0_u32,
8742        hdg_acc: 0_u32,
8743    };
8744    #[cfg(feature = "arbitrary")]
8745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8746        use arbitrary::{Arbitrary, Unstructured};
8747        let mut buf = [0u8; 1024];
8748        rng.fill_bytes(&mut buf);
8749        let mut unstructured = Unstructured::new(&buf);
8750        Self::arbitrary(&mut unstructured).unwrap_or_default()
8751    }
8752}
8753impl Default for GPS2_RAW_DATA {
8754    fn default() -> Self {
8755        Self::DEFAULT.clone()
8756    }
8757}
8758impl MessageData for GPS2_RAW_DATA {
8759    type Message = MavMessage;
8760    const ID: u32 = 124u32;
8761    const NAME: &'static str = "GPS2_RAW";
8762    const EXTRA_CRC: u8 = 87u8;
8763    const ENCODED_LEN: usize = 57usize;
8764    fn deser(
8765        _version: MavlinkVersion,
8766        __input: &[u8],
8767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8768        let avail_len = __input.len();
8769        let mut payload_buf = [0; Self::ENCODED_LEN];
8770        let mut buf = if avail_len < Self::ENCODED_LEN {
8771            payload_buf[0..avail_len].copy_from_slice(__input);
8772            Bytes::new(&payload_buf)
8773        } else {
8774            Bytes::new(__input)
8775        };
8776        let mut __struct = Self::default();
8777        __struct.time_usec = buf.get_u64_le();
8778        __struct.lat = buf.get_i32_le();
8779        __struct.lon = buf.get_i32_le();
8780        __struct.alt = buf.get_i32_le();
8781        __struct.dgps_age = buf.get_u32_le();
8782        __struct.eph = buf.get_u16_le();
8783        __struct.epv = buf.get_u16_le();
8784        __struct.vel = buf.get_u16_le();
8785        __struct.cog = buf.get_u16_le();
8786        let tmp = buf.get_u8();
8787        __struct.fix_type =
8788            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8789                enum_type: "GpsFixType",
8790                value: tmp as u32,
8791            })?;
8792        __struct.satellites_visible = buf.get_u8();
8793        __struct.dgps_numch = buf.get_u8();
8794        __struct.yaw = buf.get_u16_le();
8795        __struct.alt_ellipsoid = buf.get_i32_le();
8796        __struct.h_acc = buf.get_u32_le();
8797        __struct.v_acc = buf.get_u32_le();
8798        __struct.vel_acc = buf.get_u32_le();
8799        __struct.hdg_acc = buf.get_u32_le();
8800        Ok(__struct)
8801    }
8802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8803        let mut __tmp = BytesMut::new(bytes);
8804        #[allow(clippy::absurd_extreme_comparisons)]
8805        #[allow(unused_comparisons)]
8806        if __tmp.remaining() < Self::ENCODED_LEN {
8807            panic!(
8808                "buffer is too small (need {} bytes, but got {})",
8809                Self::ENCODED_LEN,
8810                __tmp.remaining(),
8811            )
8812        }
8813        __tmp.put_u64_le(self.time_usec);
8814        __tmp.put_i32_le(self.lat);
8815        __tmp.put_i32_le(self.lon);
8816        __tmp.put_i32_le(self.alt);
8817        __tmp.put_u32_le(self.dgps_age);
8818        __tmp.put_u16_le(self.eph);
8819        __tmp.put_u16_le(self.epv);
8820        __tmp.put_u16_le(self.vel);
8821        __tmp.put_u16_le(self.cog);
8822        __tmp.put_u8(self.fix_type as u8);
8823        __tmp.put_u8(self.satellites_visible);
8824        __tmp.put_u8(self.dgps_numch);
8825        __tmp.put_u16_le(self.yaw);
8826        __tmp.put_i32_le(self.alt_ellipsoid);
8827        __tmp.put_u32_le(self.h_acc);
8828        __tmp.put_u32_le(self.v_acc);
8829        __tmp.put_u32_le(self.vel_acc);
8830        __tmp.put_u32_le(self.hdg_acc);
8831        if matches!(version, MavlinkVersion::V2) {
8832            let len = __tmp.len();
8833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8834        } else {
8835            __tmp.len()
8836        }
8837    }
8838}
8839#[doc = "id: 162"]
8840#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
8841#[derive(Debug, Clone, PartialEq)]
8842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8844pub struct FENCE_STATUS_DATA {
8845    #[doc = "Time (since boot) of last breach."]
8846    pub breach_time: u32,
8847    #[doc = "Number of fence breaches."]
8848    pub breach_count: u16,
8849    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
8850    pub breach_status: u8,
8851    #[doc = "Last breach type."]
8852    pub breach_type: FenceBreach,
8853    #[doc = "Active action to prevent fence breach"]
8854    #[cfg_attr(feature = "serde", serde(default))]
8855    pub breach_mitigation: FenceMitigate,
8856}
8857impl FENCE_STATUS_DATA {
8858    pub const ENCODED_LEN: usize = 9usize;
8859    pub const DEFAULT: Self = Self {
8860        breach_time: 0_u32,
8861        breach_count: 0_u16,
8862        breach_status: 0_u8,
8863        breach_type: FenceBreach::DEFAULT,
8864        breach_mitigation: FenceMitigate::DEFAULT,
8865    };
8866    #[cfg(feature = "arbitrary")]
8867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8868        use arbitrary::{Arbitrary, Unstructured};
8869        let mut buf = [0u8; 1024];
8870        rng.fill_bytes(&mut buf);
8871        let mut unstructured = Unstructured::new(&buf);
8872        Self::arbitrary(&mut unstructured).unwrap_or_default()
8873    }
8874}
8875impl Default for FENCE_STATUS_DATA {
8876    fn default() -> Self {
8877        Self::DEFAULT.clone()
8878    }
8879}
8880impl MessageData for FENCE_STATUS_DATA {
8881    type Message = MavMessage;
8882    const ID: u32 = 162u32;
8883    const NAME: &'static str = "FENCE_STATUS";
8884    const EXTRA_CRC: u8 = 189u8;
8885    const ENCODED_LEN: usize = 9usize;
8886    fn deser(
8887        _version: MavlinkVersion,
8888        __input: &[u8],
8889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8890        let avail_len = __input.len();
8891        let mut payload_buf = [0; Self::ENCODED_LEN];
8892        let mut buf = if avail_len < Self::ENCODED_LEN {
8893            payload_buf[0..avail_len].copy_from_slice(__input);
8894            Bytes::new(&payload_buf)
8895        } else {
8896            Bytes::new(__input)
8897        };
8898        let mut __struct = Self::default();
8899        __struct.breach_time = buf.get_u32_le();
8900        __struct.breach_count = buf.get_u16_le();
8901        __struct.breach_status = buf.get_u8();
8902        let tmp = buf.get_u8();
8903        __struct.breach_type =
8904            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8905                enum_type: "FenceBreach",
8906                value: tmp as u32,
8907            })?;
8908        let tmp = buf.get_u8();
8909        __struct.breach_mitigation =
8910            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8911                enum_type: "FenceMitigate",
8912                value: tmp as u32,
8913            })?;
8914        Ok(__struct)
8915    }
8916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8917        let mut __tmp = BytesMut::new(bytes);
8918        #[allow(clippy::absurd_extreme_comparisons)]
8919        #[allow(unused_comparisons)]
8920        if __tmp.remaining() < Self::ENCODED_LEN {
8921            panic!(
8922                "buffer is too small (need {} bytes, but got {})",
8923                Self::ENCODED_LEN,
8924                __tmp.remaining(),
8925            )
8926        }
8927        __tmp.put_u32_le(self.breach_time);
8928        __tmp.put_u16_le(self.breach_count);
8929        __tmp.put_u8(self.breach_status);
8930        __tmp.put_u8(self.breach_type as u8);
8931        __tmp.put_u8(self.breach_mitigation as u8);
8932        if matches!(version, MavlinkVersion::V2) {
8933            let len = __tmp.len();
8934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8935        } else {
8936            __tmp.len()
8937        }
8938    }
8939}
8940#[doc = "id: 144"]
8941#[doc = "Current motion information from a designated system."]
8942#[derive(Debug, Clone, PartialEq)]
8943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8945pub struct FOLLOW_TARGET_DATA {
8946    #[doc = "Timestamp (time since system boot)."]
8947    pub timestamp: u64,
8948    #[doc = "button states or switches of a tracker device"]
8949    pub custom_state: u64,
8950    #[doc = "Latitude (WGS84)"]
8951    pub lat: i32,
8952    #[doc = "Longitude (WGS84)"]
8953    pub lon: i32,
8954    #[doc = "Altitude (MSL)"]
8955    pub alt: f32,
8956    #[doc = "target velocity (0,0,0) for unknown"]
8957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8958    pub vel: [f32; 3],
8959    #[doc = "linear target acceleration (0,0,0) for unknown"]
8960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8961    pub acc: [f32; 3],
8962    #[doc = "(0 0 0 0 for unknown)"]
8963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8964    pub attitude_q: [f32; 4],
8965    #[doc = "(0 0 0 for unknown)"]
8966    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8967    pub rates: [f32; 3],
8968    #[doc = "eph epv"]
8969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8970    pub position_cov: [f32; 3],
8971    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
8972    pub est_capabilities: u8,
8973}
8974impl FOLLOW_TARGET_DATA {
8975    pub const ENCODED_LEN: usize = 93usize;
8976    pub const DEFAULT: Self = Self {
8977        timestamp: 0_u64,
8978        custom_state: 0_u64,
8979        lat: 0_i32,
8980        lon: 0_i32,
8981        alt: 0.0_f32,
8982        vel: [0.0_f32; 3usize],
8983        acc: [0.0_f32; 3usize],
8984        attitude_q: [0.0_f32; 4usize],
8985        rates: [0.0_f32; 3usize],
8986        position_cov: [0.0_f32; 3usize],
8987        est_capabilities: 0_u8,
8988    };
8989    #[cfg(feature = "arbitrary")]
8990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8991        use arbitrary::{Arbitrary, Unstructured};
8992        let mut buf = [0u8; 1024];
8993        rng.fill_bytes(&mut buf);
8994        let mut unstructured = Unstructured::new(&buf);
8995        Self::arbitrary(&mut unstructured).unwrap_or_default()
8996    }
8997}
8998impl Default for FOLLOW_TARGET_DATA {
8999    fn default() -> Self {
9000        Self::DEFAULT.clone()
9001    }
9002}
9003impl MessageData for FOLLOW_TARGET_DATA {
9004    type Message = MavMessage;
9005    const ID: u32 = 144u32;
9006    const NAME: &'static str = "FOLLOW_TARGET";
9007    const EXTRA_CRC: u8 = 127u8;
9008    const ENCODED_LEN: usize = 93usize;
9009    fn deser(
9010        _version: MavlinkVersion,
9011        __input: &[u8],
9012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9013        let avail_len = __input.len();
9014        let mut payload_buf = [0; Self::ENCODED_LEN];
9015        let mut buf = if avail_len < Self::ENCODED_LEN {
9016            payload_buf[0..avail_len].copy_from_slice(__input);
9017            Bytes::new(&payload_buf)
9018        } else {
9019            Bytes::new(__input)
9020        };
9021        let mut __struct = Self::default();
9022        __struct.timestamp = buf.get_u64_le();
9023        __struct.custom_state = buf.get_u64_le();
9024        __struct.lat = buf.get_i32_le();
9025        __struct.lon = buf.get_i32_le();
9026        __struct.alt = buf.get_f32_le();
9027        for v in &mut __struct.vel {
9028            let val = buf.get_f32_le();
9029            *v = val;
9030        }
9031        for v in &mut __struct.acc {
9032            let val = buf.get_f32_le();
9033            *v = val;
9034        }
9035        for v in &mut __struct.attitude_q {
9036            let val = buf.get_f32_le();
9037            *v = val;
9038        }
9039        for v in &mut __struct.rates {
9040            let val = buf.get_f32_le();
9041            *v = val;
9042        }
9043        for v in &mut __struct.position_cov {
9044            let val = buf.get_f32_le();
9045            *v = val;
9046        }
9047        __struct.est_capabilities = buf.get_u8();
9048        Ok(__struct)
9049    }
9050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9051        let mut __tmp = BytesMut::new(bytes);
9052        #[allow(clippy::absurd_extreme_comparisons)]
9053        #[allow(unused_comparisons)]
9054        if __tmp.remaining() < Self::ENCODED_LEN {
9055            panic!(
9056                "buffer is too small (need {} bytes, but got {})",
9057                Self::ENCODED_LEN,
9058                __tmp.remaining(),
9059            )
9060        }
9061        __tmp.put_u64_le(self.timestamp);
9062        __tmp.put_u64_le(self.custom_state);
9063        __tmp.put_i32_le(self.lat);
9064        __tmp.put_i32_le(self.lon);
9065        __tmp.put_f32_le(self.alt);
9066        for val in &self.vel {
9067            __tmp.put_f32_le(*val);
9068        }
9069        for val in &self.acc {
9070            __tmp.put_f32_le(*val);
9071        }
9072        for val in &self.attitude_q {
9073            __tmp.put_f32_le(*val);
9074        }
9075        for val in &self.rates {
9076            __tmp.put_f32_le(*val);
9077        }
9078        for val in &self.position_cov {
9079            __tmp.put_f32_le(*val);
9080        }
9081        __tmp.put_u8(self.est_capabilities);
9082        if matches!(version, MavlinkVersion::V2) {
9083            let len = __tmp.len();
9084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9085        } else {
9086            __tmp.len()
9087        }
9088    }
9089}
9090#[doc = "id: 254"]
9091#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
9092#[derive(Debug, Clone, PartialEq)]
9093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9095pub struct DEBUG_DATA {
9096    #[doc = "Timestamp (time since system boot)."]
9097    pub time_boot_ms: u32,
9098    #[doc = "DEBUG value"]
9099    pub value: f32,
9100    #[doc = "index of debug variable"]
9101    pub ind: u8,
9102}
9103impl DEBUG_DATA {
9104    pub const ENCODED_LEN: usize = 9usize;
9105    pub const DEFAULT: Self = Self {
9106        time_boot_ms: 0_u32,
9107        value: 0.0_f32,
9108        ind: 0_u8,
9109    };
9110    #[cfg(feature = "arbitrary")]
9111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9112        use arbitrary::{Arbitrary, Unstructured};
9113        let mut buf = [0u8; 1024];
9114        rng.fill_bytes(&mut buf);
9115        let mut unstructured = Unstructured::new(&buf);
9116        Self::arbitrary(&mut unstructured).unwrap_or_default()
9117    }
9118}
9119impl Default for DEBUG_DATA {
9120    fn default() -> Self {
9121        Self::DEFAULT.clone()
9122    }
9123}
9124impl MessageData for DEBUG_DATA {
9125    type Message = MavMessage;
9126    const ID: u32 = 254u32;
9127    const NAME: &'static str = "DEBUG";
9128    const EXTRA_CRC: u8 = 46u8;
9129    const ENCODED_LEN: usize = 9usize;
9130    fn deser(
9131        _version: MavlinkVersion,
9132        __input: &[u8],
9133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9134        let avail_len = __input.len();
9135        let mut payload_buf = [0; Self::ENCODED_LEN];
9136        let mut buf = if avail_len < Self::ENCODED_LEN {
9137            payload_buf[0..avail_len].copy_from_slice(__input);
9138            Bytes::new(&payload_buf)
9139        } else {
9140            Bytes::new(__input)
9141        };
9142        let mut __struct = Self::default();
9143        __struct.time_boot_ms = buf.get_u32_le();
9144        __struct.value = buf.get_f32_le();
9145        __struct.ind = buf.get_u8();
9146        Ok(__struct)
9147    }
9148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9149        let mut __tmp = BytesMut::new(bytes);
9150        #[allow(clippy::absurd_extreme_comparisons)]
9151        #[allow(unused_comparisons)]
9152        if __tmp.remaining() < Self::ENCODED_LEN {
9153            panic!(
9154                "buffer is too small (need {} bytes, but got {})",
9155                Self::ENCODED_LEN,
9156                __tmp.remaining(),
9157            )
9158        }
9159        __tmp.put_u32_le(self.time_boot_ms);
9160        __tmp.put_f32_le(self.value);
9161        __tmp.put_u8(self.ind);
9162        if matches!(version, MavlinkVersion::V2) {
9163            let len = __tmp.len();
9164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9165        } else {
9166            __tmp.len()
9167        }
9168    }
9169}
9170#[doc = "id: 132"]
9171#[doc = "Distance sensor information for an onboard rangefinder."]
9172#[derive(Debug, Clone, PartialEq)]
9173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9175pub struct DISTANCE_SENSOR_DATA {
9176    #[doc = "Timestamp (time since system boot)."]
9177    pub time_boot_ms: u32,
9178    #[doc = "Minimum distance the sensor can measure"]
9179    pub min_distance: u16,
9180    #[doc = "Maximum distance the sensor can measure"]
9181    pub max_distance: u16,
9182    #[doc = "Current distance reading"]
9183    pub current_distance: u16,
9184    #[doc = "Type of distance sensor."]
9185    pub mavtype: MavDistanceSensor,
9186    #[doc = "Onboard ID of the sensor"]
9187    pub id: u8,
9188    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
9189    pub orientation: MavSensorOrientation,
9190    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
9191    pub covariance: u8,
9192    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
9193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9194    pub horizontal_fov: f32,
9195    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
9196    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9197    pub vertical_fov: f32,
9198    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
9199    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9200    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9201    pub quaternion: [f32; 4],
9202    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
9203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9204    pub signal_quality: u8,
9205}
9206impl DISTANCE_SENSOR_DATA {
9207    pub const ENCODED_LEN: usize = 39usize;
9208    pub const DEFAULT: Self = Self {
9209        time_boot_ms: 0_u32,
9210        min_distance: 0_u16,
9211        max_distance: 0_u16,
9212        current_distance: 0_u16,
9213        mavtype: MavDistanceSensor::DEFAULT,
9214        id: 0_u8,
9215        orientation: MavSensorOrientation::DEFAULT,
9216        covariance: 0_u8,
9217        horizontal_fov: 0.0_f32,
9218        vertical_fov: 0.0_f32,
9219        quaternion: [0.0_f32; 4usize],
9220        signal_quality: 0_u8,
9221    };
9222    #[cfg(feature = "arbitrary")]
9223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9224        use arbitrary::{Arbitrary, Unstructured};
9225        let mut buf = [0u8; 1024];
9226        rng.fill_bytes(&mut buf);
9227        let mut unstructured = Unstructured::new(&buf);
9228        Self::arbitrary(&mut unstructured).unwrap_or_default()
9229    }
9230}
9231impl Default for DISTANCE_SENSOR_DATA {
9232    fn default() -> Self {
9233        Self::DEFAULT.clone()
9234    }
9235}
9236impl MessageData for DISTANCE_SENSOR_DATA {
9237    type Message = MavMessage;
9238    const ID: u32 = 132u32;
9239    const NAME: &'static str = "DISTANCE_SENSOR";
9240    const EXTRA_CRC: u8 = 85u8;
9241    const ENCODED_LEN: usize = 39usize;
9242    fn deser(
9243        _version: MavlinkVersion,
9244        __input: &[u8],
9245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9246        let avail_len = __input.len();
9247        let mut payload_buf = [0; Self::ENCODED_LEN];
9248        let mut buf = if avail_len < Self::ENCODED_LEN {
9249            payload_buf[0..avail_len].copy_from_slice(__input);
9250            Bytes::new(&payload_buf)
9251        } else {
9252            Bytes::new(__input)
9253        };
9254        let mut __struct = Self::default();
9255        __struct.time_boot_ms = buf.get_u32_le();
9256        __struct.min_distance = buf.get_u16_le();
9257        __struct.max_distance = buf.get_u16_le();
9258        __struct.current_distance = buf.get_u16_le();
9259        let tmp = buf.get_u8();
9260        __struct.mavtype =
9261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9262                enum_type: "MavDistanceSensor",
9263                value: tmp as u32,
9264            })?;
9265        __struct.id = buf.get_u8();
9266        let tmp = buf.get_u8();
9267        __struct.orientation =
9268            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9269                enum_type: "MavSensorOrientation",
9270                value: tmp as u32,
9271            })?;
9272        __struct.covariance = buf.get_u8();
9273        __struct.horizontal_fov = buf.get_f32_le();
9274        __struct.vertical_fov = buf.get_f32_le();
9275        for v in &mut __struct.quaternion {
9276            let val = buf.get_f32_le();
9277            *v = val;
9278        }
9279        __struct.signal_quality = buf.get_u8();
9280        Ok(__struct)
9281    }
9282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9283        let mut __tmp = BytesMut::new(bytes);
9284        #[allow(clippy::absurd_extreme_comparisons)]
9285        #[allow(unused_comparisons)]
9286        if __tmp.remaining() < Self::ENCODED_LEN {
9287            panic!(
9288                "buffer is too small (need {} bytes, but got {})",
9289                Self::ENCODED_LEN,
9290                __tmp.remaining(),
9291            )
9292        }
9293        __tmp.put_u32_le(self.time_boot_ms);
9294        __tmp.put_u16_le(self.min_distance);
9295        __tmp.put_u16_le(self.max_distance);
9296        __tmp.put_u16_le(self.current_distance);
9297        __tmp.put_u8(self.mavtype as u8);
9298        __tmp.put_u8(self.id);
9299        __tmp.put_u8(self.orientation as u8);
9300        __tmp.put_u8(self.covariance);
9301        __tmp.put_f32_le(self.horizontal_fov);
9302        __tmp.put_f32_le(self.vertical_fov);
9303        for val in &self.quaternion {
9304            __tmp.put_f32_le(*val);
9305        }
9306        __tmp.put_u8(self.signal_quality);
9307        if matches!(version, MavlinkVersion::V2) {
9308            let len = __tmp.len();
9309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9310        } else {
9311            __tmp.len()
9312        }
9313    }
9314}
9315#[doc = "id: 46"]
9316#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
9317#[derive(Debug, Clone, PartialEq)]
9318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9320pub struct MISSION_ITEM_REACHED_DATA {
9321    #[doc = "Sequence"]
9322    pub seq: u16,
9323}
9324impl MISSION_ITEM_REACHED_DATA {
9325    pub const ENCODED_LEN: usize = 2usize;
9326    pub const DEFAULT: Self = Self { seq: 0_u16 };
9327    #[cfg(feature = "arbitrary")]
9328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9329        use arbitrary::{Arbitrary, Unstructured};
9330        let mut buf = [0u8; 1024];
9331        rng.fill_bytes(&mut buf);
9332        let mut unstructured = Unstructured::new(&buf);
9333        Self::arbitrary(&mut unstructured).unwrap_or_default()
9334    }
9335}
9336impl Default for MISSION_ITEM_REACHED_DATA {
9337    fn default() -> Self {
9338        Self::DEFAULT.clone()
9339    }
9340}
9341impl MessageData for MISSION_ITEM_REACHED_DATA {
9342    type Message = MavMessage;
9343    const ID: u32 = 46u32;
9344    const NAME: &'static str = "MISSION_ITEM_REACHED";
9345    const EXTRA_CRC: u8 = 11u8;
9346    const ENCODED_LEN: usize = 2usize;
9347    fn deser(
9348        _version: MavlinkVersion,
9349        __input: &[u8],
9350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9351        let avail_len = __input.len();
9352        let mut payload_buf = [0; Self::ENCODED_LEN];
9353        let mut buf = if avail_len < Self::ENCODED_LEN {
9354            payload_buf[0..avail_len].copy_from_slice(__input);
9355            Bytes::new(&payload_buf)
9356        } else {
9357            Bytes::new(__input)
9358        };
9359        let mut __struct = Self::default();
9360        __struct.seq = buf.get_u16_le();
9361        Ok(__struct)
9362    }
9363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9364        let mut __tmp = BytesMut::new(bytes);
9365        #[allow(clippy::absurd_extreme_comparisons)]
9366        #[allow(unused_comparisons)]
9367        if __tmp.remaining() < Self::ENCODED_LEN {
9368            panic!(
9369                "buffer is too small (need {} bytes, but got {})",
9370                Self::ENCODED_LEN,
9371                __tmp.remaining(),
9372            )
9373        }
9374        __tmp.put_u16_le(self.seq);
9375        if matches!(version, MavlinkVersion::V2) {
9376            let len = __tmp.len();
9377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9378        } else {
9379            __tmp.len()
9380        }
9381    }
9382}
9383#[doc = "id: 34"]
9384#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
9385#[derive(Debug, Clone, PartialEq)]
9386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9388pub struct RC_CHANNELS_SCALED_DATA {
9389    #[doc = "Timestamp (time since system boot)."]
9390    pub time_boot_ms: u32,
9391    #[doc = "RC channel 1 value scaled."]
9392    pub chan1_scaled: i16,
9393    #[doc = "RC channel 2 value scaled."]
9394    pub chan2_scaled: i16,
9395    #[doc = "RC channel 3 value scaled."]
9396    pub chan3_scaled: i16,
9397    #[doc = "RC channel 4 value scaled."]
9398    pub chan4_scaled: i16,
9399    #[doc = "RC channel 5 value scaled."]
9400    pub chan5_scaled: i16,
9401    #[doc = "RC channel 6 value scaled."]
9402    pub chan6_scaled: i16,
9403    #[doc = "RC channel 7 value scaled."]
9404    pub chan7_scaled: i16,
9405    #[doc = "RC channel 8 value scaled."]
9406    pub chan8_scaled: i16,
9407    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
9408    pub port: u8,
9409    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
9410    pub rssi: u8,
9411}
9412impl RC_CHANNELS_SCALED_DATA {
9413    pub const ENCODED_LEN: usize = 22usize;
9414    pub const DEFAULT: Self = Self {
9415        time_boot_ms: 0_u32,
9416        chan1_scaled: 0_i16,
9417        chan2_scaled: 0_i16,
9418        chan3_scaled: 0_i16,
9419        chan4_scaled: 0_i16,
9420        chan5_scaled: 0_i16,
9421        chan6_scaled: 0_i16,
9422        chan7_scaled: 0_i16,
9423        chan8_scaled: 0_i16,
9424        port: 0_u8,
9425        rssi: 0_u8,
9426    };
9427    #[cfg(feature = "arbitrary")]
9428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9429        use arbitrary::{Arbitrary, Unstructured};
9430        let mut buf = [0u8; 1024];
9431        rng.fill_bytes(&mut buf);
9432        let mut unstructured = Unstructured::new(&buf);
9433        Self::arbitrary(&mut unstructured).unwrap_or_default()
9434    }
9435}
9436impl Default for RC_CHANNELS_SCALED_DATA {
9437    fn default() -> Self {
9438        Self::DEFAULT.clone()
9439    }
9440}
9441impl MessageData for RC_CHANNELS_SCALED_DATA {
9442    type Message = MavMessage;
9443    const ID: u32 = 34u32;
9444    const NAME: &'static str = "RC_CHANNELS_SCALED";
9445    const EXTRA_CRC: u8 = 237u8;
9446    const ENCODED_LEN: usize = 22usize;
9447    fn deser(
9448        _version: MavlinkVersion,
9449        __input: &[u8],
9450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9451        let avail_len = __input.len();
9452        let mut payload_buf = [0; Self::ENCODED_LEN];
9453        let mut buf = if avail_len < Self::ENCODED_LEN {
9454            payload_buf[0..avail_len].copy_from_slice(__input);
9455            Bytes::new(&payload_buf)
9456        } else {
9457            Bytes::new(__input)
9458        };
9459        let mut __struct = Self::default();
9460        __struct.time_boot_ms = buf.get_u32_le();
9461        __struct.chan1_scaled = buf.get_i16_le();
9462        __struct.chan2_scaled = buf.get_i16_le();
9463        __struct.chan3_scaled = buf.get_i16_le();
9464        __struct.chan4_scaled = buf.get_i16_le();
9465        __struct.chan5_scaled = buf.get_i16_le();
9466        __struct.chan6_scaled = buf.get_i16_le();
9467        __struct.chan7_scaled = buf.get_i16_le();
9468        __struct.chan8_scaled = buf.get_i16_le();
9469        __struct.port = buf.get_u8();
9470        __struct.rssi = buf.get_u8();
9471        Ok(__struct)
9472    }
9473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9474        let mut __tmp = BytesMut::new(bytes);
9475        #[allow(clippy::absurd_extreme_comparisons)]
9476        #[allow(unused_comparisons)]
9477        if __tmp.remaining() < Self::ENCODED_LEN {
9478            panic!(
9479                "buffer is too small (need {} bytes, but got {})",
9480                Self::ENCODED_LEN,
9481                __tmp.remaining(),
9482            )
9483        }
9484        __tmp.put_u32_le(self.time_boot_ms);
9485        __tmp.put_i16_le(self.chan1_scaled);
9486        __tmp.put_i16_le(self.chan2_scaled);
9487        __tmp.put_i16_le(self.chan3_scaled);
9488        __tmp.put_i16_le(self.chan4_scaled);
9489        __tmp.put_i16_le(self.chan5_scaled);
9490        __tmp.put_i16_le(self.chan6_scaled);
9491        __tmp.put_i16_le(self.chan7_scaled);
9492        __tmp.put_i16_le(self.chan8_scaled);
9493        __tmp.put_u8(self.port);
9494        __tmp.put_u8(self.rssi);
9495        if matches!(version, MavlinkVersion::V2) {
9496            let len = __tmp.len();
9497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9498        } else {
9499            __tmp.len()
9500        }
9501    }
9502}
9503#[doc = "id: 324"]
9504#[doc = "Response from a PARAM_EXT_SET message."]
9505#[derive(Debug, Clone, PartialEq)]
9506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9508pub struct PARAM_EXT_ACK_DATA {
9509    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
9510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9511    pub param_id: [u8; 16],
9512    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
9513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9514    pub param_value: [u8; 128],
9515    #[doc = "Parameter type."]
9516    pub param_type: MavParamExtType,
9517    #[doc = "Result code."]
9518    pub param_result: ParamAck,
9519}
9520impl PARAM_EXT_ACK_DATA {
9521    pub const ENCODED_LEN: usize = 146usize;
9522    pub const DEFAULT: Self = Self {
9523        param_id: [0_u8; 16usize],
9524        param_value: [0_u8; 128usize],
9525        param_type: MavParamExtType::DEFAULT,
9526        param_result: ParamAck::DEFAULT,
9527    };
9528    #[cfg(feature = "arbitrary")]
9529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9530        use arbitrary::{Arbitrary, Unstructured};
9531        let mut buf = [0u8; 1024];
9532        rng.fill_bytes(&mut buf);
9533        let mut unstructured = Unstructured::new(&buf);
9534        Self::arbitrary(&mut unstructured).unwrap_or_default()
9535    }
9536}
9537impl Default for PARAM_EXT_ACK_DATA {
9538    fn default() -> Self {
9539        Self::DEFAULT.clone()
9540    }
9541}
9542impl MessageData for PARAM_EXT_ACK_DATA {
9543    type Message = MavMessage;
9544    const ID: u32 = 324u32;
9545    const NAME: &'static str = "PARAM_EXT_ACK";
9546    const EXTRA_CRC: u8 = 132u8;
9547    const ENCODED_LEN: usize = 146usize;
9548    fn deser(
9549        _version: MavlinkVersion,
9550        __input: &[u8],
9551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9552        let avail_len = __input.len();
9553        let mut payload_buf = [0; Self::ENCODED_LEN];
9554        let mut buf = if avail_len < Self::ENCODED_LEN {
9555            payload_buf[0..avail_len].copy_from_slice(__input);
9556            Bytes::new(&payload_buf)
9557        } else {
9558            Bytes::new(__input)
9559        };
9560        let mut __struct = Self::default();
9561        for v in &mut __struct.param_id {
9562            let val = buf.get_u8();
9563            *v = val;
9564        }
9565        for v in &mut __struct.param_value {
9566            let val = buf.get_u8();
9567            *v = val;
9568        }
9569        let tmp = buf.get_u8();
9570        __struct.param_type =
9571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9572                enum_type: "MavParamExtType",
9573                value: tmp as u32,
9574            })?;
9575        let tmp = buf.get_u8();
9576        __struct.param_result =
9577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9578                enum_type: "ParamAck",
9579                value: tmp as u32,
9580            })?;
9581        Ok(__struct)
9582    }
9583    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9584        let mut __tmp = BytesMut::new(bytes);
9585        #[allow(clippy::absurd_extreme_comparisons)]
9586        #[allow(unused_comparisons)]
9587        if __tmp.remaining() < Self::ENCODED_LEN {
9588            panic!(
9589                "buffer is too small (need {} bytes, but got {})",
9590                Self::ENCODED_LEN,
9591                __tmp.remaining(),
9592            )
9593        }
9594        for val in &self.param_id {
9595            __tmp.put_u8(*val);
9596        }
9597        for val in &self.param_value {
9598            __tmp.put_u8(*val);
9599        }
9600        __tmp.put_u8(self.param_type as u8);
9601        __tmp.put_u8(self.param_result as u8);
9602        if matches!(version, MavlinkVersion::V2) {
9603            let len = __tmp.len();
9604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9605        } else {
9606            __tmp.len()
9607        }
9608    }
9609}
9610#[doc = "id: 148"]
9611#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
9612#[derive(Debug, Clone, PartialEq)]
9613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9615pub struct AUTOPILOT_VERSION_DATA {
9616    #[doc = "Bitmap of capabilities"]
9617    pub capabilities: MavProtocolCapability,
9618    #[doc = "UID if provided by hardware (see uid2)"]
9619    pub uid: u64,
9620    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
9621    pub flight_sw_version: u32,
9622    #[doc = "Middleware version number"]
9623    pub middleware_sw_version: u32,
9624    #[doc = "Operating system version number"]
9625    pub os_sw_version: u32,
9626    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
9627    pub board_version: u32,
9628    #[doc = "ID of the board vendor"]
9629    pub vendor_id: u16,
9630    #[doc = "ID of the product"]
9631    pub product_id: u16,
9632    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
9633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9634    pub flight_custom_version: [u8; 8],
9635    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
9636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9637    pub middleware_custom_version: [u8; 8],
9638    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
9639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9640    pub os_custom_version: [u8; 8],
9641    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
9642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9644    pub uid2: [u8; 18],
9645}
9646impl AUTOPILOT_VERSION_DATA {
9647    pub const ENCODED_LEN: usize = 78usize;
9648    pub const DEFAULT: Self = Self {
9649        capabilities: MavProtocolCapability::DEFAULT,
9650        uid: 0_u64,
9651        flight_sw_version: 0_u32,
9652        middleware_sw_version: 0_u32,
9653        os_sw_version: 0_u32,
9654        board_version: 0_u32,
9655        vendor_id: 0_u16,
9656        product_id: 0_u16,
9657        flight_custom_version: [0_u8; 8usize],
9658        middleware_custom_version: [0_u8; 8usize],
9659        os_custom_version: [0_u8; 8usize],
9660        uid2: [0_u8; 18usize],
9661    };
9662    #[cfg(feature = "arbitrary")]
9663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9664        use arbitrary::{Arbitrary, Unstructured};
9665        let mut buf = [0u8; 1024];
9666        rng.fill_bytes(&mut buf);
9667        let mut unstructured = Unstructured::new(&buf);
9668        Self::arbitrary(&mut unstructured).unwrap_or_default()
9669    }
9670}
9671impl Default for AUTOPILOT_VERSION_DATA {
9672    fn default() -> Self {
9673        Self::DEFAULT.clone()
9674    }
9675}
9676impl MessageData for AUTOPILOT_VERSION_DATA {
9677    type Message = MavMessage;
9678    const ID: u32 = 148u32;
9679    const NAME: &'static str = "AUTOPILOT_VERSION";
9680    const EXTRA_CRC: u8 = 178u8;
9681    const ENCODED_LEN: usize = 78usize;
9682    fn deser(
9683        _version: MavlinkVersion,
9684        __input: &[u8],
9685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9686        let avail_len = __input.len();
9687        let mut payload_buf = [0; Self::ENCODED_LEN];
9688        let mut buf = if avail_len < Self::ENCODED_LEN {
9689            payload_buf[0..avail_len].copy_from_slice(__input);
9690            Bytes::new(&payload_buf)
9691        } else {
9692            Bytes::new(__input)
9693        };
9694        let mut __struct = Self::default();
9695        let tmp = buf.get_u64_le();
9696        __struct.capabilities = MavProtocolCapability::from_bits(
9697            tmp & MavProtocolCapability::all().bits(),
9698        )
9699        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9700            flag_type: "MavProtocolCapability",
9701            value: tmp as u32,
9702        })?;
9703        __struct.uid = buf.get_u64_le();
9704        __struct.flight_sw_version = buf.get_u32_le();
9705        __struct.middleware_sw_version = buf.get_u32_le();
9706        __struct.os_sw_version = buf.get_u32_le();
9707        __struct.board_version = buf.get_u32_le();
9708        __struct.vendor_id = buf.get_u16_le();
9709        __struct.product_id = buf.get_u16_le();
9710        for v in &mut __struct.flight_custom_version {
9711            let val = buf.get_u8();
9712            *v = val;
9713        }
9714        for v in &mut __struct.middleware_custom_version {
9715            let val = buf.get_u8();
9716            *v = val;
9717        }
9718        for v in &mut __struct.os_custom_version {
9719            let val = buf.get_u8();
9720            *v = val;
9721        }
9722        for v in &mut __struct.uid2 {
9723            let val = buf.get_u8();
9724            *v = val;
9725        }
9726        Ok(__struct)
9727    }
9728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9729        let mut __tmp = BytesMut::new(bytes);
9730        #[allow(clippy::absurd_extreme_comparisons)]
9731        #[allow(unused_comparisons)]
9732        if __tmp.remaining() < Self::ENCODED_LEN {
9733            panic!(
9734                "buffer is too small (need {} bytes, but got {})",
9735                Self::ENCODED_LEN,
9736                __tmp.remaining(),
9737            )
9738        }
9739        __tmp.put_u64_le(self.capabilities.bits());
9740        __tmp.put_u64_le(self.uid);
9741        __tmp.put_u32_le(self.flight_sw_version);
9742        __tmp.put_u32_le(self.middleware_sw_version);
9743        __tmp.put_u32_le(self.os_sw_version);
9744        __tmp.put_u32_le(self.board_version);
9745        __tmp.put_u16_le(self.vendor_id);
9746        __tmp.put_u16_le(self.product_id);
9747        for val in &self.flight_custom_version {
9748            __tmp.put_u8(*val);
9749        }
9750        for val in &self.middleware_custom_version {
9751            __tmp.put_u8(*val);
9752        }
9753        for val in &self.os_custom_version {
9754            __tmp.put_u8(*val);
9755        }
9756        for val in &self.uid2 {
9757            __tmp.put_u8(*val);
9758        }
9759        if matches!(version, MavlinkVersion::V2) {
9760            let len = __tmp.len();
9761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9762        } else {
9763            __tmp.len()
9764        }
9765    }
9766}
9767#[doc = "id: 104"]
9768#[doc = "Global position estimate from a Vicon motion system source."]
9769#[derive(Debug, Clone, PartialEq)]
9770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9772pub struct VICON_POSITION_ESTIMATE_DATA {
9773    #[doc = "Timestamp (UNIX time or time since system boot)"]
9774    pub usec: u64,
9775    #[doc = "Global X position"]
9776    pub x: f32,
9777    #[doc = "Global Y position"]
9778    pub y: f32,
9779    #[doc = "Global Z position"]
9780    pub z: f32,
9781    #[doc = "Roll angle"]
9782    pub roll: f32,
9783    #[doc = "Pitch angle"]
9784    pub pitch: f32,
9785    #[doc = "Yaw angle"]
9786    pub yaw: f32,
9787    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
9788    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9790    pub covariance: [f32; 21],
9791}
9792impl VICON_POSITION_ESTIMATE_DATA {
9793    pub const ENCODED_LEN: usize = 116usize;
9794    pub const DEFAULT: Self = Self {
9795        usec: 0_u64,
9796        x: 0.0_f32,
9797        y: 0.0_f32,
9798        z: 0.0_f32,
9799        roll: 0.0_f32,
9800        pitch: 0.0_f32,
9801        yaw: 0.0_f32,
9802        covariance: [0.0_f32; 21usize],
9803    };
9804    #[cfg(feature = "arbitrary")]
9805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9806        use arbitrary::{Arbitrary, Unstructured};
9807        let mut buf = [0u8; 1024];
9808        rng.fill_bytes(&mut buf);
9809        let mut unstructured = Unstructured::new(&buf);
9810        Self::arbitrary(&mut unstructured).unwrap_or_default()
9811    }
9812}
9813impl Default for VICON_POSITION_ESTIMATE_DATA {
9814    fn default() -> Self {
9815        Self::DEFAULT.clone()
9816    }
9817}
9818impl MessageData for VICON_POSITION_ESTIMATE_DATA {
9819    type Message = MavMessage;
9820    const ID: u32 = 104u32;
9821    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
9822    const EXTRA_CRC: u8 = 56u8;
9823    const ENCODED_LEN: usize = 116usize;
9824    fn deser(
9825        _version: MavlinkVersion,
9826        __input: &[u8],
9827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9828        let avail_len = __input.len();
9829        let mut payload_buf = [0; Self::ENCODED_LEN];
9830        let mut buf = if avail_len < Self::ENCODED_LEN {
9831            payload_buf[0..avail_len].copy_from_slice(__input);
9832            Bytes::new(&payload_buf)
9833        } else {
9834            Bytes::new(__input)
9835        };
9836        let mut __struct = Self::default();
9837        __struct.usec = buf.get_u64_le();
9838        __struct.x = buf.get_f32_le();
9839        __struct.y = buf.get_f32_le();
9840        __struct.z = buf.get_f32_le();
9841        __struct.roll = buf.get_f32_le();
9842        __struct.pitch = buf.get_f32_le();
9843        __struct.yaw = buf.get_f32_le();
9844        for v in &mut __struct.covariance {
9845            let val = buf.get_f32_le();
9846            *v = val;
9847        }
9848        Ok(__struct)
9849    }
9850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9851        let mut __tmp = BytesMut::new(bytes);
9852        #[allow(clippy::absurd_extreme_comparisons)]
9853        #[allow(unused_comparisons)]
9854        if __tmp.remaining() < Self::ENCODED_LEN {
9855            panic!(
9856                "buffer is too small (need {} bytes, but got {})",
9857                Self::ENCODED_LEN,
9858                __tmp.remaining(),
9859            )
9860        }
9861        __tmp.put_u64_le(self.usec);
9862        __tmp.put_f32_le(self.x);
9863        __tmp.put_f32_le(self.y);
9864        __tmp.put_f32_le(self.z);
9865        __tmp.put_f32_le(self.roll);
9866        __tmp.put_f32_le(self.pitch);
9867        __tmp.put_f32_le(self.yaw);
9868        for val in &self.covariance {
9869            __tmp.put_f32_le(*val);
9870        }
9871        if matches!(version, MavlinkVersion::V2) {
9872            let len = __tmp.len();
9873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9874        } else {
9875            __tmp.len()
9876        }
9877    }
9878}
9879#[doc = "id: 12905"]
9880#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
9881#[derive(Debug, Clone, PartialEq)]
9882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9884pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
9885    #[doc = "System ID (0 for broadcast)."]
9886    pub target_system: u8,
9887    #[doc = "Component ID (0 for broadcast)."]
9888    pub target_component: u8,
9889    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
9890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9891    pub id_or_mac: [u8; 20],
9892    #[doc = "Indicates the type of the operator_id field."]
9893    pub operator_id_type: MavOdidOperatorIdType,
9894    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
9895    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9896    pub operator_id: [u8; 20],
9897}
9898impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
9899    pub const ENCODED_LEN: usize = 43usize;
9900    pub const DEFAULT: Self = Self {
9901        target_system: 0_u8,
9902        target_component: 0_u8,
9903        id_or_mac: [0_u8; 20usize],
9904        operator_id_type: MavOdidOperatorIdType::DEFAULT,
9905        operator_id: [0_u8; 20usize],
9906    };
9907    #[cfg(feature = "arbitrary")]
9908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9909        use arbitrary::{Arbitrary, Unstructured};
9910        let mut buf = [0u8; 1024];
9911        rng.fill_bytes(&mut buf);
9912        let mut unstructured = Unstructured::new(&buf);
9913        Self::arbitrary(&mut unstructured).unwrap_or_default()
9914    }
9915}
9916impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
9917    fn default() -> Self {
9918        Self::DEFAULT.clone()
9919    }
9920}
9921impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
9922    type Message = MavMessage;
9923    const ID: u32 = 12905u32;
9924    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
9925    const EXTRA_CRC: u8 = 49u8;
9926    const ENCODED_LEN: usize = 43usize;
9927    fn deser(
9928        _version: MavlinkVersion,
9929        __input: &[u8],
9930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9931        let avail_len = __input.len();
9932        let mut payload_buf = [0; Self::ENCODED_LEN];
9933        let mut buf = if avail_len < Self::ENCODED_LEN {
9934            payload_buf[0..avail_len].copy_from_slice(__input);
9935            Bytes::new(&payload_buf)
9936        } else {
9937            Bytes::new(__input)
9938        };
9939        let mut __struct = Self::default();
9940        __struct.target_system = buf.get_u8();
9941        __struct.target_component = buf.get_u8();
9942        for v in &mut __struct.id_or_mac {
9943            let val = buf.get_u8();
9944            *v = val;
9945        }
9946        let tmp = buf.get_u8();
9947        __struct.operator_id_type =
9948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9949                enum_type: "MavOdidOperatorIdType",
9950                value: tmp as u32,
9951            })?;
9952        for v in &mut __struct.operator_id {
9953            let val = buf.get_u8();
9954            *v = val;
9955        }
9956        Ok(__struct)
9957    }
9958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9959        let mut __tmp = BytesMut::new(bytes);
9960        #[allow(clippy::absurd_extreme_comparisons)]
9961        #[allow(unused_comparisons)]
9962        if __tmp.remaining() < Self::ENCODED_LEN {
9963            panic!(
9964                "buffer is too small (need {} bytes, but got {})",
9965                Self::ENCODED_LEN,
9966                __tmp.remaining(),
9967            )
9968        }
9969        __tmp.put_u8(self.target_system);
9970        __tmp.put_u8(self.target_component);
9971        for val in &self.id_or_mac {
9972            __tmp.put_u8(*val);
9973        }
9974        __tmp.put_u8(self.operator_id_type as u8);
9975        for val in &self.operator_id {
9976            __tmp.put_u8(*val);
9977        }
9978        if matches!(version, MavlinkVersion::V2) {
9979            let len = __tmp.len();
9980            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9981        } else {
9982            __tmp.len()
9983        }
9984    }
9985}
9986#[doc = "id: 269"]
9987#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
9988#[derive(Debug, Clone, PartialEq)]
9989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9991pub struct VIDEO_STREAM_INFORMATION_DATA {
9992    #[doc = "Frame rate."]
9993    pub framerate: f32,
9994    #[doc = "Bit rate."]
9995    pub bitrate: u32,
9996    #[doc = "Bitmap of stream status flags."]
9997    pub flags: VideoStreamStatusFlags,
9998    #[doc = "Horizontal resolution."]
9999    pub resolution_h: u16,
10000    #[doc = "Vertical resolution."]
10001    pub resolution_v: u16,
10002    #[doc = "Video image rotation clockwise."]
10003    pub rotation: u16,
10004    #[doc = "Horizontal Field of view."]
10005    pub hfov: u16,
10006    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
10007    pub stream_id: u8,
10008    #[doc = "Number of streams available."]
10009    pub count: u8,
10010    #[doc = "Type of stream."]
10011    pub mavtype: VideoStreamType,
10012    #[doc = "Stream name."]
10013    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10014    pub name: [u8; 32],
10015    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
10016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10017    pub uri: [u8; 160],
10018    #[doc = "Encoding of stream."]
10019    #[cfg_attr(feature = "serde", serde(default))]
10020    pub encoding: VideoStreamEncoding,
10021    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10023    pub camera_device_id: u8,
10024}
10025impl VIDEO_STREAM_INFORMATION_DATA {
10026    pub const ENCODED_LEN: usize = 215usize;
10027    pub const DEFAULT: Self = Self {
10028        framerate: 0.0_f32,
10029        bitrate: 0_u32,
10030        flags: VideoStreamStatusFlags::DEFAULT,
10031        resolution_h: 0_u16,
10032        resolution_v: 0_u16,
10033        rotation: 0_u16,
10034        hfov: 0_u16,
10035        stream_id: 0_u8,
10036        count: 0_u8,
10037        mavtype: VideoStreamType::DEFAULT,
10038        name: [0_u8; 32usize],
10039        uri: [0_u8; 160usize],
10040        encoding: VideoStreamEncoding::DEFAULT,
10041        camera_device_id: 0_u8,
10042    };
10043    #[cfg(feature = "arbitrary")]
10044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10045        use arbitrary::{Arbitrary, Unstructured};
10046        let mut buf = [0u8; 1024];
10047        rng.fill_bytes(&mut buf);
10048        let mut unstructured = Unstructured::new(&buf);
10049        Self::arbitrary(&mut unstructured).unwrap_or_default()
10050    }
10051}
10052impl Default for VIDEO_STREAM_INFORMATION_DATA {
10053    fn default() -> Self {
10054        Self::DEFAULT.clone()
10055    }
10056}
10057impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
10058    type Message = MavMessage;
10059    const ID: u32 = 269u32;
10060    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
10061    const EXTRA_CRC: u8 = 109u8;
10062    const ENCODED_LEN: usize = 215usize;
10063    fn deser(
10064        _version: MavlinkVersion,
10065        __input: &[u8],
10066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10067        let avail_len = __input.len();
10068        let mut payload_buf = [0; Self::ENCODED_LEN];
10069        let mut buf = if avail_len < Self::ENCODED_LEN {
10070            payload_buf[0..avail_len].copy_from_slice(__input);
10071            Bytes::new(&payload_buf)
10072        } else {
10073            Bytes::new(__input)
10074        };
10075        let mut __struct = Self::default();
10076        __struct.framerate = buf.get_f32_le();
10077        __struct.bitrate = buf.get_u32_le();
10078        let tmp = buf.get_u16_le();
10079        __struct.flags = VideoStreamStatusFlags::from_bits(
10080            tmp & VideoStreamStatusFlags::all().bits(),
10081        )
10082        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10083            flag_type: "VideoStreamStatusFlags",
10084            value: tmp as u32,
10085        })?;
10086        __struct.resolution_h = buf.get_u16_le();
10087        __struct.resolution_v = buf.get_u16_le();
10088        __struct.rotation = buf.get_u16_le();
10089        __struct.hfov = buf.get_u16_le();
10090        __struct.stream_id = buf.get_u8();
10091        __struct.count = buf.get_u8();
10092        let tmp = buf.get_u8();
10093        __struct.mavtype =
10094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10095                enum_type: "VideoStreamType",
10096                value: tmp as u32,
10097            })?;
10098        for v in &mut __struct.name {
10099            let val = buf.get_u8();
10100            *v = val;
10101        }
10102        for v in &mut __struct.uri {
10103            let val = buf.get_u8();
10104            *v = val;
10105        }
10106        let tmp = buf.get_u8();
10107        __struct.encoding =
10108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10109                enum_type: "VideoStreamEncoding",
10110                value: tmp as u32,
10111            })?;
10112        __struct.camera_device_id = buf.get_u8();
10113        Ok(__struct)
10114    }
10115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10116        let mut __tmp = BytesMut::new(bytes);
10117        #[allow(clippy::absurd_extreme_comparisons)]
10118        #[allow(unused_comparisons)]
10119        if __tmp.remaining() < Self::ENCODED_LEN {
10120            panic!(
10121                "buffer is too small (need {} bytes, but got {})",
10122                Self::ENCODED_LEN,
10123                __tmp.remaining(),
10124            )
10125        }
10126        __tmp.put_f32_le(self.framerate);
10127        __tmp.put_u32_le(self.bitrate);
10128        __tmp.put_u16_le(self.flags.bits());
10129        __tmp.put_u16_le(self.resolution_h);
10130        __tmp.put_u16_le(self.resolution_v);
10131        __tmp.put_u16_le(self.rotation);
10132        __tmp.put_u16_le(self.hfov);
10133        __tmp.put_u8(self.stream_id);
10134        __tmp.put_u8(self.count);
10135        __tmp.put_u8(self.mavtype as u8);
10136        for val in &self.name {
10137            __tmp.put_u8(*val);
10138        }
10139        for val in &self.uri {
10140            __tmp.put_u8(*val);
10141        }
10142        __tmp.put_u8(self.encoding as u8);
10143        __tmp.put_u8(self.camera_device_id);
10144        if matches!(version, MavlinkVersion::V2) {
10145            let len = __tmp.len();
10146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10147        } else {
10148            __tmp.len()
10149        }
10150    }
10151}
10152#[doc = "id: 267"]
10153#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
10154#[derive(Debug, Clone, PartialEq)]
10155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10157pub struct LOGGING_DATA_ACKED_DATA {
10158    #[doc = "sequence number (can wrap)"]
10159    pub sequence: u16,
10160    #[doc = "system ID of the target"]
10161    pub target_system: u8,
10162    #[doc = "component ID of the target"]
10163    pub target_component: u8,
10164    #[doc = "data length"]
10165    pub length: u8,
10166    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
10167    pub first_message_offset: u8,
10168    #[doc = "logged data"]
10169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10170    pub data: [u8; 249],
10171}
10172impl LOGGING_DATA_ACKED_DATA {
10173    pub const ENCODED_LEN: usize = 255usize;
10174    pub const DEFAULT: Self = Self {
10175        sequence: 0_u16,
10176        target_system: 0_u8,
10177        target_component: 0_u8,
10178        length: 0_u8,
10179        first_message_offset: 0_u8,
10180        data: [0_u8; 249usize],
10181    };
10182    #[cfg(feature = "arbitrary")]
10183    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10184        use arbitrary::{Arbitrary, Unstructured};
10185        let mut buf = [0u8; 1024];
10186        rng.fill_bytes(&mut buf);
10187        let mut unstructured = Unstructured::new(&buf);
10188        Self::arbitrary(&mut unstructured).unwrap_or_default()
10189    }
10190}
10191impl Default for LOGGING_DATA_ACKED_DATA {
10192    fn default() -> Self {
10193        Self::DEFAULT.clone()
10194    }
10195}
10196impl MessageData for LOGGING_DATA_ACKED_DATA {
10197    type Message = MavMessage;
10198    const ID: u32 = 267u32;
10199    const NAME: &'static str = "LOGGING_DATA_ACKED";
10200    const EXTRA_CRC: u8 = 35u8;
10201    const ENCODED_LEN: usize = 255usize;
10202    fn deser(
10203        _version: MavlinkVersion,
10204        __input: &[u8],
10205    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10206        let avail_len = __input.len();
10207        let mut payload_buf = [0; Self::ENCODED_LEN];
10208        let mut buf = if avail_len < Self::ENCODED_LEN {
10209            payload_buf[0..avail_len].copy_from_slice(__input);
10210            Bytes::new(&payload_buf)
10211        } else {
10212            Bytes::new(__input)
10213        };
10214        let mut __struct = Self::default();
10215        __struct.sequence = buf.get_u16_le();
10216        __struct.target_system = buf.get_u8();
10217        __struct.target_component = buf.get_u8();
10218        __struct.length = buf.get_u8();
10219        __struct.first_message_offset = buf.get_u8();
10220        for v in &mut __struct.data {
10221            let val = buf.get_u8();
10222            *v = val;
10223        }
10224        Ok(__struct)
10225    }
10226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10227        let mut __tmp = BytesMut::new(bytes);
10228        #[allow(clippy::absurd_extreme_comparisons)]
10229        #[allow(unused_comparisons)]
10230        if __tmp.remaining() < Self::ENCODED_LEN {
10231            panic!(
10232                "buffer is too small (need {} bytes, but got {})",
10233                Self::ENCODED_LEN,
10234                __tmp.remaining(),
10235            )
10236        }
10237        __tmp.put_u16_le(self.sequence);
10238        __tmp.put_u8(self.target_system);
10239        __tmp.put_u8(self.target_component);
10240        __tmp.put_u8(self.length);
10241        __tmp.put_u8(self.first_message_offset);
10242        for val in &self.data {
10243            __tmp.put_u8(*val);
10244        }
10245        if matches!(version, MavlinkVersion::V2) {
10246            let len = __tmp.len();
10247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10248        } else {
10249            __tmp.len()
10250        }
10251    }
10252}
10253#[doc = "id: 242"]
10254#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
10255#[derive(Debug, Clone, PartialEq)]
10256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10258pub struct HOME_POSITION_DATA {
10259    #[doc = "Latitude (WGS84)"]
10260    pub latitude: i32,
10261    #[doc = "Longitude (WGS84)"]
10262    pub longitude: i32,
10263    #[doc = "Altitude (MSL). Positive for up."]
10264    pub altitude: i32,
10265    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
10266    pub x: f32,
10267    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
10268    pub y: f32,
10269    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
10270    pub z: f32,
10271    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
10272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10273    pub q: [f32; 4],
10274    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
10275    pub approach_x: f32,
10276    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
10277    pub approach_y: f32,
10278    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
10279    pub approach_z: f32,
10280    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10281    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10282    pub time_usec: u64,
10283}
10284impl HOME_POSITION_DATA {
10285    pub const ENCODED_LEN: usize = 60usize;
10286    pub const DEFAULT: Self = Self {
10287        latitude: 0_i32,
10288        longitude: 0_i32,
10289        altitude: 0_i32,
10290        x: 0.0_f32,
10291        y: 0.0_f32,
10292        z: 0.0_f32,
10293        q: [0.0_f32; 4usize],
10294        approach_x: 0.0_f32,
10295        approach_y: 0.0_f32,
10296        approach_z: 0.0_f32,
10297        time_usec: 0_u64,
10298    };
10299    #[cfg(feature = "arbitrary")]
10300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10301        use arbitrary::{Arbitrary, Unstructured};
10302        let mut buf = [0u8; 1024];
10303        rng.fill_bytes(&mut buf);
10304        let mut unstructured = Unstructured::new(&buf);
10305        Self::arbitrary(&mut unstructured).unwrap_or_default()
10306    }
10307}
10308impl Default for HOME_POSITION_DATA {
10309    fn default() -> Self {
10310        Self::DEFAULT.clone()
10311    }
10312}
10313impl MessageData for HOME_POSITION_DATA {
10314    type Message = MavMessage;
10315    const ID: u32 = 242u32;
10316    const NAME: &'static str = "HOME_POSITION";
10317    const EXTRA_CRC: u8 = 104u8;
10318    const ENCODED_LEN: usize = 60usize;
10319    fn deser(
10320        _version: MavlinkVersion,
10321        __input: &[u8],
10322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10323        let avail_len = __input.len();
10324        let mut payload_buf = [0; Self::ENCODED_LEN];
10325        let mut buf = if avail_len < Self::ENCODED_LEN {
10326            payload_buf[0..avail_len].copy_from_slice(__input);
10327            Bytes::new(&payload_buf)
10328        } else {
10329            Bytes::new(__input)
10330        };
10331        let mut __struct = Self::default();
10332        __struct.latitude = buf.get_i32_le();
10333        __struct.longitude = buf.get_i32_le();
10334        __struct.altitude = buf.get_i32_le();
10335        __struct.x = buf.get_f32_le();
10336        __struct.y = buf.get_f32_le();
10337        __struct.z = buf.get_f32_le();
10338        for v in &mut __struct.q {
10339            let val = buf.get_f32_le();
10340            *v = val;
10341        }
10342        __struct.approach_x = buf.get_f32_le();
10343        __struct.approach_y = buf.get_f32_le();
10344        __struct.approach_z = buf.get_f32_le();
10345        __struct.time_usec = buf.get_u64_le();
10346        Ok(__struct)
10347    }
10348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10349        let mut __tmp = BytesMut::new(bytes);
10350        #[allow(clippy::absurd_extreme_comparisons)]
10351        #[allow(unused_comparisons)]
10352        if __tmp.remaining() < Self::ENCODED_LEN {
10353            panic!(
10354                "buffer is too small (need {} bytes, but got {})",
10355                Self::ENCODED_LEN,
10356                __tmp.remaining(),
10357            )
10358        }
10359        __tmp.put_i32_le(self.latitude);
10360        __tmp.put_i32_le(self.longitude);
10361        __tmp.put_i32_le(self.altitude);
10362        __tmp.put_f32_le(self.x);
10363        __tmp.put_f32_le(self.y);
10364        __tmp.put_f32_le(self.z);
10365        for val in &self.q {
10366            __tmp.put_f32_le(*val);
10367        }
10368        __tmp.put_f32_le(self.approach_x);
10369        __tmp.put_f32_le(self.approach_y);
10370        __tmp.put_f32_le(self.approach_z);
10371        __tmp.put_u64_le(self.time_usec);
10372        if matches!(version, MavlinkVersion::V2) {
10373            let len = __tmp.len();
10374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10375        } else {
10376            __tmp.len()
10377        }
10378    }
10379}
10380#[doc = "id: 129"]
10381#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
10382#[derive(Debug, Clone, PartialEq)]
10383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10385pub struct SCALED_IMU3_DATA {
10386    #[doc = "Timestamp (time since system boot)."]
10387    pub time_boot_ms: u32,
10388    #[doc = "X acceleration"]
10389    pub xacc: i16,
10390    #[doc = "Y acceleration"]
10391    pub yacc: i16,
10392    #[doc = "Z acceleration"]
10393    pub zacc: i16,
10394    #[doc = "Angular speed around X axis"]
10395    pub xgyro: i16,
10396    #[doc = "Angular speed around Y axis"]
10397    pub ygyro: i16,
10398    #[doc = "Angular speed around Z axis"]
10399    pub zgyro: i16,
10400    #[doc = "X Magnetic field"]
10401    pub xmag: i16,
10402    #[doc = "Y Magnetic field"]
10403    pub ymag: i16,
10404    #[doc = "Z Magnetic field"]
10405    pub zmag: i16,
10406    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
10407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10408    pub temperature: i16,
10409}
10410impl SCALED_IMU3_DATA {
10411    pub const ENCODED_LEN: usize = 24usize;
10412    pub const DEFAULT: Self = Self {
10413        time_boot_ms: 0_u32,
10414        xacc: 0_i16,
10415        yacc: 0_i16,
10416        zacc: 0_i16,
10417        xgyro: 0_i16,
10418        ygyro: 0_i16,
10419        zgyro: 0_i16,
10420        xmag: 0_i16,
10421        ymag: 0_i16,
10422        zmag: 0_i16,
10423        temperature: 0_i16,
10424    };
10425    #[cfg(feature = "arbitrary")]
10426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10427        use arbitrary::{Arbitrary, Unstructured};
10428        let mut buf = [0u8; 1024];
10429        rng.fill_bytes(&mut buf);
10430        let mut unstructured = Unstructured::new(&buf);
10431        Self::arbitrary(&mut unstructured).unwrap_or_default()
10432    }
10433}
10434impl Default for SCALED_IMU3_DATA {
10435    fn default() -> Self {
10436        Self::DEFAULT.clone()
10437    }
10438}
10439impl MessageData for SCALED_IMU3_DATA {
10440    type Message = MavMessage;
10441    const ID: u32 = 129u32;
10442    const NAME: &'static str = "SCALED_IMU3";
10443    const EXTRA_CRC: u8 = 46u8;
10444    const ENCODED_LEN: usize = 24usize;
10445    fn deser(
10446        _version: MavlinkVersion,
10447        __input: &[u8],
10448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10449        let avail_len = __input.len();
10450        let mut payload_buf = [0; Self::ENCODED_LEN];
10451        let mut buf = if avail_len < Self::ENCODED_LEN {
10452            payload_buf[0..avail_len].copy_from_slice(__input);
10453            Bytes::new(&payload_buf)
10454        } else {
10455            Bytes::new(__input)
10456        };
10457        let mut __struct = Self::default();
10458        __struct.time_boot_ms = buf.get_u32_le();
10459        __struct.xacc = buf.get_i16_le();
10460        __struct.yacc = buf.get_i16_le();
10461        __struct.zacc = buf.get_i16_le();
10462        __struct.xgyro = buf.get_i16_le();
10463        __struct.ygyro = buf.get_i16_le();
10464        __struct.zgyro = buf.get_i16_le();
10465        __struct.xmag = buf.get_i16_le();
10466        __struct.ymag = buf.get_i16_le();
10467        __struct.zmag = buf.get_i16_le();
10468        __struct.temperature = buf.get_i16_le();
10469        Ok(__struct)
10470    }
10471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10472        let mut __tmp = BytesMut::new(bytes);
10473        #[allow(clippy::absurd_extreme_comparisons)]
10474        #[allow(unused_comparisons)]
10475        if __tmp.remaining() < Self::ENCODED_LEN {
10476            panic!(
10477                "buffer is too small (need {} bytes, but got {})",
10478                Self::ENCODED_LEN,
10479                __tmp.remaining(),
10480            )
10481        }
10482        __tmp.put_u32_le(self.time_boot_ms);
10483        __tmp.put_i16_le(self.xacc);
10484        __tmp.put_i16_le(self.yacc);
10485        __tmp.put_i16_le(self.zacc);
10486        __tmp.put_i16_le(self.xgyro);
10487        __tmp.put_i16_le(self.ygyro);
10488        __tmp.put_i16_le(self.zgyro);
10489        __tmp.put_i16_le(self.xmag);
10490        __tmp.put_i16_le(self.ymag);
10491        __tmp.put_i16_le(self.zmag);
10492        __tmp.put_i16_le(self.temperature);
10493        if matches!(version, MavlinkVersion::V2) {
10494            let len = __tmp.len();
10495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10496        } else {
10497            __tmp.len()
10498        }
10499    }
10500}
10501#[doc = "id: 323"]
10502#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
10503#[derive(Debug, Clone, PartialEq)]
10504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10506pub struct PARAM_EXT_SET_DATA {
10507    #[doc = "System ID"]
10508    pub target_system: u8,
10509    #[doc = "Component ID"]
10510    pub target_component: u8,
10511    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
10512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10513    pub param_id: [u8; 16],
10514    #[doc = "Parameter value"]
10515    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10516    pub param_value: [u8; 128],
10517    #[doc = "Parameter type."]
10518    pub param_type: MavParamExtType,
10519}
10520impl PARAM_EXT_SET_DATA {
10521    pub const ENCODED_LEN: usize = 147usize;
10522    pub const DEFAULT: Self = Self {
10523        target_system: 0_u8,
10524        target_component: 0_u8,
10525        param_id: [0_u8; 16usize],
10526        param_value: [0_u8; 128usize],
10527        param_type: MavParamExtType::DEFAULT,
10528    };
10529    #[cfg(feature = "arbitrary")]
10530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10531        use arbitrary::{Arbitrary, Unstructured};
10532        let mut buf = [0u8; 1024];
10533        rng.fill_bytes(&mut buf);
10534        let mut unstructured = Unstructured::new(&buf);
10535        Self::arbitrary(&mut unstructured).unwrap_or_default()
10536    }
10537}
10538impl Default for PARAM_EXT_SET_DATA {
10539    fn default() -> Self {
10540        Self::DEFAULT.clone()
10541    }
10542}
10543impl MessageData for PARAM_EXT_SET_DATA {
10544    type Message = MavMessage;
10545    const ID: u32 = 323u32;
10546    const NAME: &'static str = "PARAM_EXT_SET";
10547    const EXTRA_CRC: u8 = 78u8;
10548    const ENCODED_LEN: usize = 147usize;
10549    fn deser(
10550        _version: MavlinkVersion,
10551        __input: &[u8],
10552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10553        let avail_len = __input.len();
10554        let mut payload_buf = [0; Self::ENCODED_LEN];
10555        let mut buf = if avail_len < Self::ENCODED_LEN {
10556            payload_buf[0..avail_len].copy_from_slice(__input);
10557            Bytes::new(&payload_buf)
10558        } else {
10559            Bytes::new(__input)
10560        };
10561        let mut __struct = Self::default();
10562        __struct.target_system = buf.get_u8();
10563        __struct.target_component = buf.get_u8();
10564        for v in &mut __struct.param_id {
10565            let val = buf.get_u8();
10566            *v = val;
10567        }
10568        for v in &mut __struct.param_value {
10569            let val = buf.get_u8();
10570            *v = val;
10571        }
10572        let tmp = buf.get_u8();
10573        __struct.param_type =
10574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10575                enum_type: "MavParamExtType",
10576                value: tmp as u32,
10577            })?;
10578        Ok(__struct)
10579    }
10580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10581        let mut __tmp = BytesMut::new(bytes);
10582        #[allow(clippy::absurd_extreme_comparisons)]
10583        #[allow(unused_comparisons)]
10584        if __tmp.remaining() < Self::ENCODED_LEN {
10585            panic!(
10586                "buffer is too small (need {} bytes, but got {})",
10587                Self::ENCODED_LEN,
10588                __tmp.remaining(),
10589            )
10590        }
10591        __tmp.put_u8(self.target_system);
10592        __tmp.put_u8(self.target_component);
10593        for val in &self.param_id {
10594            __tmp.put_u8(*val);
10595        }
10596        for val in &self.param_value {
10597            __tmp.put_u8(*val);
10598        }
10599        __tmp.put_u8(self.param_type as u8);
10600        if matches!(version, MavlinkVersion::V2) {
10601            let len = __tmp.len();
10602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10603        } else {
10604            __tmp.len()
10605        }
10606    }
10607}
10608#[doc = "id: 290"]
10609#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10610#[derive(Debug, Clone, PartialEq)]
10611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10613pub struct ESC_INFO_DATA {
10614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10615    pub time_usec: u64,
10616    #[doc = "Number of reported errors by each ESC since boot."]
10617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10618    pub error_count: [u32; 4],
10619    #[doc = "Counter of data packets received."]
10620    pub counter: u16,
10621    #[doc = "Bitmap of ESC failure flags."]
10622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10623    pub failure_flags: [u16; 4],
10624    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10625    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10626    pub temperature: [i16; 4],
10627    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10628    pub index: u8,
10629    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10630    pub count: u8,
10631    #[doc = "Connection type protocol for all ESC."]
10632    pub connection_type: EscConnectionType,
10633    #[doc = "Information regarding online/offline status of each ESC."]
10634    pub info: u8,
10635}
10636impl ESC_INFO_DATA {
10637    pub const ENCODED_LEN: usize = 46usize;
10638    pub const DEFAULT: Self = Self {
10639        time_usec: 0_u64,
10640        error_count: [0_u32; 4usize],
10641        counter: 0_u16,
10642        failure_flags: [0_u16; 4usize],
10643        temperature: [0_i16; 4usize],
10644        index: 0_u8,
10645        count: 0_u8,
10646        connection_type: EscConnectionType::DEFAULT,
10647        info: 0_u8,
10648    };
10649    #[cfg(feature = "arbitrary")]
10650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10651        use arbitrary::{Arbitrary, Unstructured};
10652        let mut buf = [0u8; 1024];
10653        rng.fill_bytes(&mut buf);
10654        let mut unstructured = Unstructured::new(&buf);
10655        Self::arbitrary(&mut unstructured).unwrap_or_default()
10656    }
10657}
10658impl Default for ESC_INFO_DATA {
10659    fn default() -> Self {
10660        Self::DEFAULT.clone()
10661    }
10662}
10663impl MessageData for ESC_INFO_DATA {
10664    type Message = MavMessage;
10665    const ID: u32 = 290u32;
10666    const NAME: &'static str = "ESC_INFO";
10667    const EXTRA_CRC: u8 = 251u8;
10668    const ENCODED_LEN: usize = 46usize;
10669    fn deser(
10670        _version: MavlinkVersion,
10671        __input: &[u8],
10672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10673        let avail_len = __input.len();
10674        let mut payload_buf = [0; Self::ENCODED_LEN];
10675        let mut buf = if avail_len < Self::ENCODED_LEN {
10676            payload_buf[0..avail_len].copy_from_slice(__input);
10677            Bytes::new(&payload_buf)
10678        } else {
10679            Bytes::new(__input)
10680        };
10681        let mut __struct = Self::default();
10682        __struct.time_usec = buf.get_u64_le();
10683        for v in &mut __struct.error_count {
10684            let val = buf.get_u32_le();
10685            *v = val;
10686        }
10687        __struct.counter = buf.get_u16_le();
10688        for v in &mut __struct.failure_flags {
10689            let val = buf.get_u16_le();
10690            *v = val;
10691        }
10692        for v in &mut __struct.temperature {
10693            let val = buf.get_i16_le();
10694            *v = val;
10695        }
10696        __struct.index = buf.get_u8();
10697        __struct.count = buf.get_u8();
10698        let tmp = buf.get_u8();
10699        __struct.connection_type =
10700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10701                enum_type: "EscConnectionType",
10702                value: tmp as u32,
10703            })?;
10704        __struct.info = buf.get_u8();
10705        Ok(__struct)
10706    }
10707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10708        let mut __tmp = BytesMut::new(bytes);
10709        #[allow(clippy::absurd_extreme_comparisons)]
10710        #[allow(unused_comparisons)]
10711        if __tmp.remaining() < Self::ENCODED_LEN {
10712            panic!(
10713                "buffer is too small (need {} bytes, but got {})",
10714                Self::ENCODED_LEN,
10715                __tmp.remaining(),
10716            )
10717        }
10718        __tmp.put_u64_le(self.time_usec);
10719        for val in &self.error_count {
10720            __tmp.put_u32_le(*val);
10721        }
10722        __tmp.put_u16_le(self.counter);
10723        for val in &self.failure_flags {
10724            __tmp.put_u16_le(*val);
10725        }
10726        for val in &self.temperature {
10727            __tmp.put_i16_le(*val);
10728        }
10729        __tmp.put_u8(self.index);
10730        __tmp.put_u8(self.count);
10731        __tmp.put_u8(self.connection_type as u8);
10732        __tmp.put_u8(self.info);
10733        if matches!(version, MavlinkVersion::V2) {
10734            let len = __tmp.len();
10735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10736        } else {
10737            __tmp.len()
10738        }
10739    }
10740}
10741#[doc = "id: 257"]
10742#[doc = "Report button state change."]
10743#[derive(Debug, Clone, PartialEq)]
10744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10746pub struct BUTTON_CHANGE_DATA {
10747    #[doc = "Timestamp (time since system boot)."]
10748    pub time_boot_ms: u32,
10749    #[doc = "Time of last change of button state."]
10750    pub last_change_ms: u32,
10751    #[doc = "Bitmap for state of buttons."]
10752    pub state: u8,
10753}
10754impl BUTTON_CHANGE_DATA {
10755    pub const ENCODED_LEN: usize = 9usize;
10756    pub const DEFAULT: Self = Self {
10757        time_boot_ms: 0_u32,
10758        last_change_ms: 0_u32,
10759        state: 0_u8,
10760    };
10761    #[cfg(feature = "arbitrary")]
10762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10763        use arbitrary::{Arbitrary, Unstructured};
10764        let mut buf = [0u8; 1024];
10765        rng.fill_bytes(&mut buf);
10766        let mut unstructured = Unstructured::new(&buf);
10767        Self::arbitrary(&mut unstructured).unwrap_or_default()
10768    }
10769}
10770impl Default for BUTTON_CHANGE_DATA {
10771    fn default() -> Self {
10772        Self::DEFAULT.clone()
10773    }
10774}
10775impl MessageData for BUTTON_CHANGE_DATA {
10776    type Message = MavMessage;
10777    const ID: u32 = 257u32;
10778    const NAME: &'static str = "BUTTON_CHANGE";
10779    const EXTRA_CRC: u8 = 131u8;
10780    const ENCODED_LEN: usize = 9usize;
10781    fn deser(
10782        _version: MavlinkVersion,
10783        __input: &[u8],
10784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10785        let avail_len = __input.len();
10786        let mut payload_buf = [0; Self::ENCODED_LEN];
10787        let mut buf = if avail_len < Self::ENCODED_LEN {
10788            payload_buf[0..avail_len].copy_from_slice(__input);
10789            Bytes::new(&payload_buf)
10790        } else {
10791            Bytes::new(__input)
10792        };
10793        let mut __struct = Self::default();
10794        __struct.time_boot_ms = buf.get_u32_le();
10795        __struct.last_change_ms = buf.get_u32_le();
10796        __struct.state = buf.get_u8();
10797        Ok(__struct)
10798    }
10799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10800        let mut __tmp = BytesMut::new(bytes);
10801        #[allow(clippy::absurd_extreme_comparisons)]
10802        #[allow(unused_comparisons)]
10803        if __tmp.remaining() < Self::ENCODED_LEN {
10804            panic!(
10805                "buffer is too small (need {} bytes, but got {})",
10806                Self::ENCODED_LEN,
10807                __tmp.remaining(),
10808            )
10809        }
10810        __tmp.put_u32_le(self.time_boot_ms);
10811        __tmp.put_u32_le(self.last_change_ms);
10812        __tmp.put_u8(self.state);
10813        if matches!(version, MavlinkVersion::V2) {
10814            let len = __tmp.len();
10815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10816        } else {
10817            __tmp.len()
10818        }
10819    }
10820}
10821#[doc = "id: 134"]
10822#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
10823#[derive(Debug, Clone, PartialEq)]
10824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10826pub struct TERRAIN_DATA_DATA {
10827    #[doc = "Latitude of SW corner of first grid"]
10828    pub lat: i32,
10829    #[doc = "Longitude of SW corner of first grid"]
10830    pub lon: i32,
10831    #[doc = "Grid spacing"]
10832    pub grid_spacing: u16,
10833    #[doc = "Terrain data MSL"]
10834    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10835    pub data: [i16; 16],
10836    #[doc = "bit within the terrain request mask"]
10837    pub gridbit: u8,
10838}
10839impl TERRAIN_DATA_DATA {
10840    pub const ENCODED_LEN: usize = 43usize;
10841    pub const DEFAULT: Self = Self {
10842        lat: 0_i32,
10843        lon: 0_i32,
10844        grid_spacing: 0_u16,
10845        data: [0_i16; 16usize],
10846        gridbit: 0_u8,
10847    };
10848    #[cfg(feature = "arbitrary")]
10849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10850        use arbitrary::{Arbitrary, Unstructured};
10851        let mut buf = [0u8; 1024];
10852        rng.fill_bytes(&mut buf);
10853        let mut unstructured = Unstructured::new(&buf);
10854        Self::arbitrary(&mut unstructured).unwrap_or_default()
10855    }
10856}
10857impl Default for TERRAIN_DATA_DATA {
10858    fn default() -> Self {
10859        Self::DEFAULT.clone()
10860    }
10861}
10862impl MessageData for TERRAIN_DATA_DATA {
10863    type Message = MavMessage;
10864    const ID: u32 = 134u32;
10865    const NAME: &'static str = "TERRAIN_DATA";
10866    const EXTRA_CRC: u8 = 229u8;
10867    const ENCODED_LEN: usize = 43usize;
10868    fn deser(
10869        _version: MavlinkVersion,
10870        __input: &[u8],
10871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10872        let avail_len = __input.len();
10873        let mut payload_buf = [0; Self::ENCODED_LEN];
10874        let mut buf = if avail_len < Self::ENCODED_LEN {
10875            payload_buf[0..avail_len].copy_from_slice(__input);
10876            Bytes::new(&payload_buf)
10877        } else {
10878            Bytes::new(__input)
10879        };
10880        let mut __struct = Self::default();
10881        __struct.lat = buf.get_i32_le();
10882        __struct.lon = buf.get_i32_le();
10883        __struct.grid_spacing = buf.get_u16_le();
10884        for v in &mut __struct.data {
10885            let val = buf.get_i16_le();
10886            *v = val;
10887        }
10888        __struct.gridbit = buf.get_u8();
10889        Ok(__struct)
10890    }
10891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10892        let mut __tmp = BytesMut::new(bytes);
10893        #[allow(clippy::absurd_extreme_comparisons)]
10894        #[allow(unused_comparisons)]
10895        if __tmp.remaining() < Self::ENCODED_LEN {
10896            panic!(
10897                "buffer is too small (need {} bytes, but got {})",
10898                Self::ENCODED_LEN,
10899                __tmp.remaining(),
10900            )
10901        }
10902        __tmp.put_i32_le(self.lat);
10903        __tmp.put_i32_le(self.lon);
10904        __tmp.put_u16_le(self.grid_spacing);
10905        for val in &self.data {
10906            __tmp.put_i16_le(*val);
10907        }
10908        __tmp.put_u8(self.gridbit);
10909        if matches!(version, MavlinkVersion::V2) {
10910            let len = __tmp.len();
10911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10912        } else {
10913            __tmp.len()
10914        }
10915    }
10916}
10917#[doc = "id: 12919"]
10918#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
10919#[derive(Debug, Clone, PartialEq)]
10920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10922pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
10923    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
10924    pub operator_latitude: i32,
10925    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
10926    pub operator_longitude: i32,
10927    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
10928    pub operator_altitude_geo: f32,
10929    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
10930    pub timestamp: u32,
10931    #[doc = "System ID (0 for broadcast)."]
10932    pub target_system: u8,
10933    #[doc = "Component ID (0 for broadcast)."]
10934    pub target_component: u8,
10935}
10936impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
10937    pub const ENCODED_LEN: usize = 18usize;
10938    pub const DEFAULT: Self = Self {
10939        operator_latitude: 0_i32,
10940        operator_longitude: 0_i32,
10941        operator_altitude_geo: 0.0_f32,
10942        timestamp: 0_u32,
10943        target_system: 0_u8,
10944        target_component: 0_u8,
10945    };
10946    #[cfg(feature = "arbitrary")]
10947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10948        use arbitrary::{Arbitrary, Unstructured};
10949        let mut buf = [0u8; 1024];
10950        rng.fill_bytes(&mut buf);
10951        let mut unstructured = Unstructured::new(&buf);
10952        Self::arbitrary(&mut unstructured).unwrap_or_default()
10953    }
10954}
10955impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
10956    fn default() -> Self {
10957        Self::DEFAULT.clone()
10958    }
10959}
10960impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
10961    type Message = MavMessage;
10962    const ID: u32 = 12919u32;
10963    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
10964    const EXTRA_CRC: u8 = 7u8;
10965    const ENCODED_LEN: usize = 18usize;
10966    fn deser(
10967        _version: MavlinkVersion,
10968        __input: &[u8],
10969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10970        let avail_len = __input.len();
10971        let mut payload_buf = [0; Self::ENCODED_LEN];
10972        let mut buf = if avail_len < Self::ENCODED_LEN {
10973            payload_buf[0..avail_len].copy_from_slice(__input);
10974            Bytes::new(&payload_buf)
10975        } else {
10976            Bytes::new(__input)
10977        };
10978        let mut __struct = Self::default();
10979        __struct.operator_latitude = buf.get_i32_le();
10980        __struct.operator_longitude = buf.get_i32_le();
10981        __struct.operator_altitude_geo = buf.get_f32_le();
10982        __struct.timestamp = buf.get_u32_le();
10983        __struct.target_system = buf.get_u8();
10984        __struct.target_component = buf.get_u8();
10985        Ok(__struct)
10986    }
10987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10988        let mut __tmp = BytesMut::new(bytes);
10989        #[allow(clippy::absurd_extreme_comparisons)]
10990        #[allow(unused_comparisons)]
10991        if __tmp.remaining() < Self::ENCODED_LEN {
10992            panic!(
10993                "buffer is too small (need {} bytes, but got {})",
10994                Self::ENCODED_LEN,
10995                __tmp.remaining(),
10996            )
10997        }
10998        __tmp.put_i32_le(self.operator_latitude);
10999        __tmp.put_i32_le(self.operator_longitude);
11000        __tmp.put_f32_le(self.operator_altitude_geo);
11001        __tmp.put_u32_le(self.timestamp);
11002        __tmp.put_u8(self.target_system);
11003        __tmp.put_u8(self.target_component);
11004        if matches!(version, MavlinkVersion::V2) {
11005            let len = __tmp.len();
11006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11007        } else {
11008            __tmp.len()
11009        }
11010    }
11011}
11012#[doc = "id: 233"]
11013#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
11014#[derive(Debug, Clone, PartialEq)]
11015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11017pub struct GPS_RTCM_DATA_DATA {
11018    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
11019    pub flags: u8,
11020    #[doc = "data length"]
11021    pub len: u8,
11022    #[doc = "RTCM message (may be fragmented)"]
11023    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11024    pub data: [u8; 180],
11025}
11026impl GPS_RTCM_DATA_DATA {
11027    pub const ENCODED_LEN: usize = 182usize;
11028    pub const DEFAULT: Self = Self {
11029        flags: 0_u8,
11030        len: 0_u8,
11031        data: [0_u8; 180usize],
11032    };
11033    #[cfg(feature = "arbitrary")]
11034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11035        use arbitrary::{Arbitrary, Unstructured};
11036        let mut buf = [0u8; 1024];
11037        rng.fill_bytes(&mut buf);
11038        let mut unstructured = Unstructured::new(&buf);
11039        Self::arbitrary(&mut unstructured).unwrap_or_default()
11040    }
11041}
11042impl Default for GPS_RTCM_DATA_DATA {
11043    fn default() -> Self {
11044        Self::DEFAULT.clone()
11045    }
11046}
11047impl MessageData for GPS_RTCM_DATA_DATA {
11048    type Message = MavMessage;
11049    const ID: u32 = 233u32;
11050    const NAME: &'static str = "GPS_RTCM_DATA";
11051    const EXTRA_CRC: u8 = 35u8;
11052    const ENCODED_LEN: usize = 182usize;
11053    fn deser(
11054        _version: MavlinkVersion,
11055        __input: &[u8],
11056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11057        let avail_len = __input.len();
11058        let mut payload_buf = [0; Self::ENCODED_LEN];
11059        let mut buf = if avail_len < Self::ENCODED_LEN {
11060            payload_buf[0..avail_len].copy_from_slice(__input);
11061            Bytes::new(&payload_buf)
11062        } else {
11063            Bytes::new(__input)
11064        };
11065        let mut __struct = Self::default();
11066        __struct.flags = buf.get_u8();
11067        __struct.len = buf.get_u8();
11068        for v in &mut __struct.data {
11069            let val = buf.get_u8();
11070            *v = val;
11071        }
11072        Ok(__struct)
11073    }
11074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11075        let mut __tmp = BytesMut::new(bytes);
11076        #[allow(clippy::absurd_extreme_comparisons)]
11077        #[allow(unused_comparisons)]
11078        if __tmp.remaining() < Self::ENCODED_LEN {
11079            panic!(
11080                "buffer is too small (need {} bytes, but got {})",
11081                Self::ENCODED_LEN,
11082                __tmp.remaining(),
11083            )
11084        }
11085        __tmp.put_u8(self.flags);
11086        __tmp.put_u8(self.len);
11087        for val in &self.data {
11088            __tmp.put_u8(*val);
11089        }
11090        if matches!(version, MavlinkVersion::V2) {
11091            let len = __tmp.len();
11092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11093        } else {
11094            __tmp.len()
11095        }
11096    }
11097}
11098#[doc = "id: 141"]
11099#[doc = "The current system altitude."]
11100#[derive(Debug, Clone, PartialEq)]
11101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11103pub struct ALTITUDE_DATA {
11104    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11105    pub time_usec: u64,
11106    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
11107    pub altitude_monotonic: f32,
11108    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
11109    pub altitude_amsl: f32,
11110    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
11111    pub altitude_local: f32,
11112    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
11113    pub altitude_relative: f32,
11114    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
11115    pub altitude_terrain: f32,
11116    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
11117    pub bottom_clearance: f32,
11118}
11119impl ALTITUDE_DATA {
11120    pub const ENCODED_LEN: usize = 32usize;
11121    pub const DEFAULT: Self = Self {
11122        time_usec: 0_u64,
11123        altitude_monotonic: 0.0_f32,
11124        altitude_amsl: 0.0_f32,
11125        altitude_local: 0.0_f32,
11126        altitude_relative: 0.0_f32,
11127        altitude_terrain: 0.0_f32,
11128        bottom_clearance: 0.0_f32,
11129    };
11130    #[cfg(feature = "arbitrary")]
11131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11132        use arbitrary::{Arbitrary, Unstructured};
11133        let mut buf = [0u8; 1024];
11134        rng.fill_bytes(&mut buf);
11135        let mut unstructured = Unstructured::new(&buf);
11136        Self::arbitrary(&mut unstructured).unwrap_or_default()
11137    }
11138}
11139impl Default for ALTITUDE_DATA {
11140    fn default() -> Self {
11141        Self::DEFAULT.clone()
11142    }
11143}
11144impl MessageData for ALTITUDE_DATA {
11145    type Message = MavMessage;
11146    const ID: u32 = 141u32;
11147    const NAME: &'static str = "ALTITUDE";
11148    const EXTRA_CRC: u8 = 47u8;
11149    const ENCODED_LEN: usize = 32usize;
11150    fn deser(
11151        _version: MavlinkVersion,
11152        __input: &[u8],
11153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11154        let avail_len = __input.len();
11155        let mut payload_buf = [0; Self::ENCODED_LEN];
11156        let mut buf = if avail_len < Self::ENCODED_LEN {
11157            payload_buf[0..avail_len].copy_from_slice(__input);
11158            Bytes::new(&payload_buf)
11159        } else {
11160            Bytes::new(__input)
11161        };
11162        let mut __struct = Self::default();
11163        __struct.time_usec = buf.get_u64_le();
11164        __struct.altitude_monotonic = buf.get_f32_le();
11165        __struct.altitude_amsl = buf.get_f32_le();
11166        __struct.altitude_local = buf.get_f32_le();
11167        __struct.altitude_relative = buf.get_f32_le();
11168        __struct.altitude_terrain = buf.get_f32_le();
11169        __struct.bottom_clearance = buf.get_f32_le();
11170        Ok(__struct)
11171    }
11172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11173        let mut __tmp = BytesMut::new(bytes);
11174        #[allow(clippy::absurd_extreme_comparisons)]
11175        #[allow(unused_comparisons)]
11176        if __tmp.remaining() < Self::ENCODED_LEN {
11177            panic!(
11178                "buffer is too small (need {} bytes, but got {})",
11179                Self::ENCODED_LEN,
11180                __tmp.remaining(),
11181            )
11182        }
11183        __tmp.put_u64_le(self.time_usec);
11184        __tmp.put_f32_le(self.altitude_monotonic);
11185        __tmp.put_f32_le(self.altitude_amsl);
11186        __tmp.put_f32_le(self.altitude_local);
11187        __tmp.put_f32_le(self.altitude_relative);
11188        __tmp.put_f32_le(self.altitude_terrain);
11189        __tmp.put_f32_le(self.bottom_clearance);
11190        if matches!(version, MavlinkVersion::V2) {
11191            let len = __tmp.len();
11192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11193        } else {
11194            __tmp.len()
11195        }
11196    }
11197}
11198#[doc = "id: 1"]
11199#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
11200#[derive(Debug, Clone, PartialEq)]
11201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11203pub struct SYS_STATUS_DATA {
11204    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
11205    pub onboard_control_sensors_present: MavSysStatusSensor,
11206    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
11207    pub onboard_control_sensors_enabled: MavSysStatusSensor,
11208    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
11209    pub onboard_control_sensors_health: MavSysStatusSensor,
11210    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
11211    pub load: u16,
11212    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
11213    pub voltage_battery: u16,
11214    #[doc = "Battery current, -1: Current not sent by autopilot"]
11215    pub current_battery: i16,
11216    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
11217    pub drop_rate_comm: u16,
11218    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
11219    pub errors_comm: u16,
11220    #[doc = "Autopilot-specific errors"]
11221    pub errors_count1: u16,
11222    #[doc = "Autopilot-specific errors"]
11223    pub errors_count2: u16,
11224    #[doc = "Autopilot-specific errors"]
11225    pub errors_count3: u16,
11226    #[doc = "Autopilot-specific errors"]
11227    pub errors_count4: u16,
11228    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
11229    pub battery_remaining: i8,
11230    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
11231    #[cfg_attr(feature = "serde", serde(default))]
11232    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
11233    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
11234    #[cfg_attr(feature = "serde", serde(default))]
11235    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
11236    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
11237    #[cfg_attr(feature = "serde", serde(default))]
11238    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
11239}
11240impl SYS_STATUS_DATA {
11241    pub const ENCODED_LEN: usize = 43usize;
11242    pub const DEFAULT: Self = Self {
11243        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
11244        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
11245        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
11246        load: 0_u16,
11247        voltage_battery: 0_u16,
11248        current_battery: 0_i16,
11249        drop_rate_comm: 0_u16,
11250        errors_comm: 0_u16,
11251        errors_count1: 0_u16,
11252        errors_count2: 0_u16,
11253        errors_count3: 0_u16,
11254        errors_count4: 0_u16,
11255        battery_remaining: 0_i8,
11256        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
11257        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
11258        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
11259    };
11260    #[cfg(feature = "arbitrary")]
11261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11262        use arbitrary::{Arbitrary, Unstructured};
11263        let mut buf = [0u8; 1024];
11264        rng.fill_bytes(&mut buf);
11265        let mut unstructured = Unstructured::new(&buf);
11266        Self::arbitrary(&mut unstructured).unwrap_or_default()
11267    }
11268}
11269impl Default for SYS_STATUS_DATA {
11270    fn default() -> Self {
11271        Self::DEFAULT.clone()
11272    }
11273}
11274impl MessageData for SYS_STATUS_DATA {
11275    type Message = MavMessage;
11276    const ID: u32 = 1u32;
11277    const NAME: &'static str = "SYS_STATUS";
11278    const EXTRA_CRC: u8 = 124u8;
11279    const ENCODED_LEN: usize = 43usize;
11280    fn deser(
11281        _version: MavlinkVersion,
11282        __input: &[u8],
11283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11284        let avail_len = __input.len();
11285        let mut payload_buf = [0; Self::ENCODED_LEN];
11286        let mut buf = if avail_len < Self::ENCODED_LEN {
11287            payload_buf[0..avail_len].copy_from_slice(__input);
11288            Bytes::new(&payload_buf)
11289        } else {
11290            Bytes::new(__input)
11291        };
11292        let mut __struct = Self::default();
11293        let tmp = buf.get_u32_le();
11294        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
11295            tmp & MavSysStatusSensor::all().bits(),
11296        )
11297        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11298            flag_type: "MavSysStatusSensor",
11299            value: tmp as u32,
11300        })?;
11301        let tmp = buf.get_u32_le();
11302        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
11303            tmp & MavSysStatusSensor::all().bits(),
11304        )
11305        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11306            flag_type: "MavSysStatusSensor",
11307            value: tmp as u32,
11308        })?;
11309        let tmp = buf.get_u32_le();
11310        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
11311            tmp & MavSysStatusSensor::all().bits(),
11312        )
11313        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11314            flag_type: "MavSysStatusSensor",
11315            value: tmp as u32,
11316        })?;
11317        __struct.load = buf.get_u16_le();
11318        __struct.voltage_battery = buf.get_u16_le();
11319        __struct.current_battery = buf.get_i16_le();
11320        __struct.drop_rate_comm = buf.get_u16_le();
11321        __struct.errors_comm = buf.get_u16_le();
11322        __struct.errors_count1 = buf.get_u16_le();
11323        __struct.errors_count2 = buf.get_u16_le();
11324        __struct.errors_count3 = buf.get_u16_le();
11325        __struct.errors_count4 = buf.get_u16_le();
11326        __struct.battery_remaining = buf.get_i8();
11327        let tmp = buf.get_u32_le();
11328        __struct.onboard_control_sensors_present_extended =
11329            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11330                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11331                flag_type: "MavSysStatusSensorExtended",
11332                value: tmp as u32,
11333            })?;
11334        let tmp = buf.get_u32_le();
11335        __struct.onboard_control_sensors_enabled_extended =
11336            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11337                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11338                flag_type: "MavSysStatusSensorExtended",
11339                value: tmp as u32,
11340            })?;
11341        let tmp = buf.get_u32_le();
11342        __struct.onboard_control_sensors_health_extended =
11343            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11344                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11345                flag_type: "MavSysStatusSensorExtended",
11346                value: tmp as u32,
11347            })?;
11348        Ok(__struct)
11349    }
11350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11351        let mut __tmp = BytesMut::new(bytes);
11352        #[allow(clippy::absurd_extreme_comparisons)]
11353        #[allow(unused_comparisons)]
11354        if __tmp.remaining() < Self::ENCODED_LEN {
11355            panic!(
11356                "buffer is too small (need {} bytes, but got {})",
11357                Self::ENCODED_LEN,
11358                __tmp.remaining(),
11359            )
11360        }
11361        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
11362        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
11363        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
11364        __tmp.put_u16_le(self.load);
11365        __tmp.put_u16_le(self.voltage_battery);
11366        __tmp.put_i16_le(self.current_battery);
11367        __tmp.put_u16_le(self.drop_rate_comm);
11368        __tmp.put_u16_le(self.errors_comm);
11369        __tmp.put_u16_le(self.errors_count1);
11370        __tmp.put_u16_le(self.errors_count2);
11371        __tmp.put_u16_le(self.errors_count3);
11372        __tmp.put_u16_le(self.errors_count4);
11373        __tmp.put_i8(self.battery_remaining);
11374        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
11375        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
11376        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
11377        if matches!(version, MavlinkVersion::V2) {
11378            let len = __tmp.len();
11379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11380        } else {
11381            __tmp.len()
11382        }
11383    }
11384}
11385#[doc = "id: 224"]
11386#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
11387#[derive(Debug, Clone, PartialEq)]
11388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11390pub struct COMMAND_LONG_STAMPED_DATA {
11391    #[doc = "Microseconds elapsed since vehicle boot"]
11392    pub vehicle_timestamp: u64,
11393    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
11394    pub utc_time: u32,
11395    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
11396    pub param1: f32,
11397    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
11398    pub param2: f32,
11399    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
11400    pub param3: f32,
11401    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
11402    pub param4: f32,
11403    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
11404    pub param5: f32,
11405    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
11406    pub param6: f32,
11407    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
11408    pub param7: f32,
11409    #[doc = "Command ID, as defined by MAV_CMD enum."]
11410    pub command: MavCmd,
11411    #[doc = "System which should execute the command"]
11412    pub target_system: u8,
11413    #[doc = "Component which should execute the command, 0 for all components"]
11414    pub target_component: u8,
11415    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
11416    pub confirmation: u8,
11417}
11418impl COMMAND_LONG_STAMPED_DATA {
11419    pub const ENCODED_LEN: usize = 45usize;
11420    pub const DEFAULT: Self = Self {
11421        vehicle_timestamp: 0_u64,
11422        utc_time: 0_u32,
11423        param1: 0.0_f32,
11424        param2: 0.0_f32,
11425        param3: 0.0_f32,
11426        param4: 0.0_f32,
11427        param5: 0.0_f32,
11428        param6: 0.0_f32,
11429        param7: 0.0_f32,
11430        command: MavCmd::DEFAULT,
11431        target_system: 0_u8,
11432        target_component: 0_u8,
11433        confirmation: 0_u8,
11434    };
11435    #[cfg(feature = "arbitrary")]
11436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11437        use arbitrary::{Arbitrary, Unstructured};
11438        let mut buf = [0u8; 1024];
11439        rng.fill_bytes(&mut buf);
11440        let mut unstructured = Unstructured::new(&buf);
11441        Self::arbitrary(&mut unstructured).unwrap_or_default()
11442    }
11443}
11444impl Default for COMMAND_LONG_STAMPED_DATA {
11445    fn default() -> Self {
11446        Self::DEFAULT.clone()
11447    }
11448}
11449impl MessageData for COMMAND_LONG_STAMPED_DATA {
11450    type Message = MavMessage;
11451    const ID: u32 = 224u32;
11452    const NAME: &'static str = "COMMAND_LONG_STAMPED";
11453    const EXTRA_CRC: u8 = 102u8;
11454    const ENCODED_LEN: usize = 45usize;
11455    fn deser(
11456        _version: MavlinkVersion,
11457        __input: &[u8],
11458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11459        let avail_len = __input.len();
11460        let mut payload_buf = [0; Self::ENCODED_LEN];
11461        let mut buf = if avail_len < Self::ENCODED_LEN {
11462            payload_buf[0..avail_len].copy_from_slice(__input);
11463            Bytes::new(&payload_buf)
11464        } else {
11465            Bytes::new(__input)
11466        };
11467        let mut __struct = Self::default();
11468        __struct.vehicle_timestamp = buf.get_u64_le();
11469        __struct.utc_time = buf.get_u32_le();
11470        __struct.param1 = buf.get_f32_le();
11471        __struct.param2 = buf.get_f32_le();
11472        __struct.param3 = buf.get_f32_le();
11473        __struct.param4 = buf.get_f32_le();
11474        __struct.param5 = buf.get_f32_le();
11475        __struct.param6 = buf.get_f32_le();
11476        __struct.param7 = buf.get_f32_le();
11477        let tmp = buf.get_u16_le();
11478        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11479            ::mavlink_core::error::ParserError::InvalidEnum {
11480                enum_type: "MavCmd",
11481                value: tmp as u32,
11482            },
11483        )?;
11484        __struct.target_system = buf.get_u8();
11485        __struct.target_component = buf.get_u8();
11486        __struct.confirmation = buf.get_u8();
11487        Ok(__struct)
11488    }
11489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11490        let mut __tmp = BytesMut::new(bytes);
11491        #[allow(clippy::absurd_extreme_comparisons)]
11492        #[allow(unused_comparisons)]
11493        if __tmp.remaining() < Self::ENCODED_LEN {
11494            panic!(
11495                "buffer is too small (need {} bytes, but got {})",
11496                Self::ENCODED_LEN,
11497                __tmp.remaining(),
11498            )
11499        }
11500        __tmp.put_u64_le(self.vehicle_timestamp);
11501        __tmp.put_u32_le(self.utc_time);
11502        __tmp.put_f32_le(self.param1);
11503        __tmp.put_f32_le(self.param2);
11504        __tmp.put_f32_le(self.param3);
11505        __tmp.put_f32_le(self.param4);
11506        __tmp.put_f32_le(self.param5);
11507        __tmp.put_f32_le(self.param6);
11508        __tmp.put_f32_le(self.param7);
11509        __tmp.put_u16_le(self.command as u16);
11510        __tmp.put_u8(self.target_system);
11511        __tmp.put_u8(self.target_component);
11512        __tmp.put_u8(self.confirmation);
11513        if matches!(version, MavlinkVersion::V2) {
11514            let len = __tmp.len();
11515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11516        } else {
11517            __tmp.len()
11518        }
11519    }
11520}
11521#[doc = "id: 31"]
11522#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
11523#[derive(Debug, Clone, PartialEq)]
11524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11526pub struct ATTITUDE_QUATERNION_DATA {
11527    #[doc = "Timestamp (time since system boot)."]
11528    pub time_boot_ms: u32,
11529    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
11530    pub q1: f32,
11531    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
11532    pub q2: f32,
11533    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
11534    pub q3: f32,
11535    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
11536    pub q4: f32,
11537    #[doc = "Roll angular speed"]
11538    pub rollspeed: f32,
11539    #[doc = "Pitch angular speed"]
11540    pub pitchspeed: f32,
11541    #[doc = "Yaw angular speed"]
11542    pub yawspeed: f32,
11543    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
11544    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11546    pub repr_offset_q: [f32; 4],
11547}
11548impl ATTITUDE_QUATERNION_DATA {
11549    pub const ENCODED_LEN: usize = 48usize;
11550    pub const DEFAULT: Self = Self {
11551        time_boot_ms: 0_u32,
11552        q1: 0.0_f32,
11553        q2: 0.0_f32,
11554        q3: 0.0_f32,
11555        q4: 0.0_f32,
11556        rollspeed: 0.0_f32,
11557        pitchspeed: 0.0_f32,
11558        yawspeed: 0.0_f32,
11559        repr_offset_q: [0.0_f32; 4usize],
11560    };
11561    #[cfg(feature = "arbitrary")]
11562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11563        use arbitrary::{Arbitrary, Unstructured};
11564        let mut buf = [0u8; 1024];
11565        rng.fill_bytes(&mut buf);
11566        let mut unstructured = Unstructured::new(&buf);
11567        Self::arbitrary(&mut unstructured).unwrap_or_default()
11568    }
11569}
11570impl Default for ATTITUDE_QUATERNION_DATA {
11571    fn default() -> Self {
11572        Self::DEFAULT.clone()
11573    }
11574}
11575impl MessageData for ATTITUDE_QUATERNION_DATA {
11576    type Message = MavMessage;
11577    const ID: u32 = 31u32;
11578    const NAME: &'static str = "ATTITUDE_QUATERNION";
11579    const EXTRA_CRC: u8 = 246u8;
11580    const ENCODED_LEN: usize = 48usize;
11581    fn deser(
11582        _version: MavlinkVersion,
11583        __input: &[u8],
11584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11585        let avail_len = __input.len();
11586        let mut payload_buf = [0; Self::ENCODED_LEN];
11587        let mut buf = if avail_len < Self::ENCODED_LEN {
11588            payload_buf[0..avail_len].copy_from_slice(__input);
11589            Bytes::new(&payload_buf)
11590        } else {
11591            Bytes::new(__input)
11592        };
11593        let mut __struct = Self::default();
11594        __struct.time_boot_ms = buf.get_u32_le();
11595        __struct.q1 = buf.get_f32_le();
11596        __struct.q2 = buf.get_f32_le();
11597        __struct.q3 = buf.get_f32_le();
11598        __struct.q4 = buf.get_f32_le();
11599        __struct.rollspeed = buf.get_f32_le();
11600        __struct.pitchspeed = buf.get_f32_le();
11601        __struct.yawspeed = buf.get_f32_le();
11602        for v in &mut __struct.repr_offset_q {
11603            let val = buf.get_f32_le();
11604            *v = val;
11605        }
11606        Ok(__struct)
11607    }
11608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11609        let mut __tmp = BytesMut::new(bytes);
11610        #[allow(clippy::absurd_extreme_comparisons)]
11611        #[allow(unused_comparisons)]
11612        if __tmp.remaining() < Self::ENCODED_LEN {
11613            panic!(
11614                "buffer is too small (need {} bytes, but got {})",
11615                Self::ENCODED_LEN,
11616                __tmp.remaining(),
11617            )
11618        }
11619        __tmp.put_u32_le(self.time_boot_ms);
11620        __tmp.put_f32_le(self.q1);
11621        __tmp.put_f32_le(self.q2);
11622        __tmp.put_f32_le(self.q3);
11623        __tmp.put_f32_le(self.q4);
11624        __tmp.put_f32_le(self.rollspeed);
11625        __tmp.put_f32_le(self.pitchspeed);
11626        __tmp.put_f32_le(self.yawspeed);
11627        for val in &self.repr_offset_q {
11628            __tmp.put_f32_le(*val);
11629        }
11630        if matches!(version, MavlinkVersion::V2) {
11631            let len = __tmp.len();
11632            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11633        } else {
11634            __tmp.len()
11635        }
11636    }
11637}
11638#[doc = "id: 375"]
11639#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
11640#[derive(Debug, Clone, PartialEq)]
11641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11643pub struct ACTUATOR_OUTPUT_STATUS_DATA {
11644    #[doc = "Timestamp (since system boot)."]
11645    pub time_usec: u64,
11646    #[doc = "Active outputs"]
11647    pub active: u32,
11648    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
11649    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11650    pub actuator: [f32; 32],
11651}
11652impl ACTUATOR_OUTPUT_STATUS_DATA {
11653    pub const ENCODED_LEN: usize = 140usize;
11654    pub const DEFAULT: Self = Self {
11655        time_usec: 0_u64,
11656        active: 0_u32,
11657        actuator: [0.0_f32; 32usize],
11658    };
11659    #[cfg(feature = "arbitrary")]
11660    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11661        use arbitrary::{Arbitrary, Unstructured};
11662        let mut buf = [0u8; 1024];
11663        rng.fill_bytes(&mut buf);
11664        let mut unstructured = Unstructured::new(&buf);
11665        Self::arbitrary(&mut unstructured).unwrap_or_default()
11666    }
11667}
11668impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
11669    fn default() -> Self {
11670        Self::DEFAULT.clone()
11671    }
11672}
11673impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
11674    type Message = MavMessage;
11675    const ID: u32 = 375u32;
11676    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
11677    const EXTRA_CRC: u8 = 251u8;
11678    const ENCODED_LEN: usize = 140usize;
11679    fn deser(
11680        _version: MavlinkVersion,
11681        __input: &[u8],
11682    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11683        let avail_len = __input.len();
11684        let mut payload_buf = [0; Self::ENCODED_LEN];
11685        let mut buf = if avail_len < Self::ENCODED_LEN {
11686            payload_buf[0..avail_len].copy_from_slice(__input);
11687            Bytes::new(&payload_buf)
11688        } else {
11689            Bytes::new(__input)
11690        };
11691        let mut __struct = Self::default();
11692        __struct.time_usec = buf.get_u64_le();
11693        __struct.active = buf.get_u32_le();
11694        for v in &mut __struct.actuator {
11695            let val = buf.get_f32_le();
11696            *v = val;
11697        }
11698        Ok(__struct)
11699    }
11700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11701        let mut __tmp = BytesMut::new(bytes);
11702        #[allow(clippy::absurd_extreme_comparisons)]
11703        #[allow(unused_comparisons)]
11704        if __tmp.remaining() < Self::ENCODED_LEN {
11705            panic!(
11706                "buffer is too small (need {} bytes, but got {})",
11707                Self::ENCODED_LEN,
11708                __tmp.remaining(),
11709            )
11710        }
11711        __tmp.put_u64_le(self.time_usec);
11712        __tmp.put_u32_le(self.active);
11713        for val in &self.actuator {
11714            __tmp.put_f32_le(*val);
11715        }
11716        if matches!(version, MavlinkVersion::V2) {
11717            let len = __tmp.len();
11718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11719        } else {
11720            __tmp.len()
11721        }
11722    }
11723}
11724#[doc = "id: 85"]
11725#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
11726#[derive(Debug, Clone, PartialEq)]
11727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11729pub struct POSITION_TARGET_LOCAL_NED_DATA {
11730    #[doc = "Timestamp (time since system boot)."]
11731    pub time_boot_ms: u32,
11732    #[doc = "X Position in NED frame"]
11733    pub x: f32,
11734    #[doc = "Y Position in NED frame"]
11735    pub y: f32,
11736    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
11737    pub z: f32,
11738    #[doc = "X velocity in NED frame"]
11739    pub vx: f32,
11740    #[doc = "Y velocity in NED frame"]
11741    pub vy: f32,
11742    #[doc = "Z velocity in NED frame"]
11743    pub vz: f32,
11744    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
11745    pub afx: f32,
11746    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
11747    pub afy: f32,
11748    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
11749    pub afz: f32,
11750    #[doc = "yaw setpoint"]
11751    pub yaw: f32,
11752    #[doc = "yaw rate setpoint"]
11753    pub yaw_rate: f32,
11754    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
11755    pub type_mask: PositionTargetTypemask,
11756    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
11757    pub coordinate_frame: MavFrame,
11758}
11759impl POSITION_TARGET_LOCAL_NED_DATA {
11760    pub const ENCODED_LEN: usize = 51usize;
11761    pub const DEFAULT: Self = Self {
11762        time_boot_ms: 0_u32,
11763        x: 0.0_f32,
11764        y: 0.0_f32,
11765        z: 0.0_f32,
11766        vx: 0.0_f32,
11767        vy: 0.0_f32,
11768        vz: 0.0_f32,
11769        afx: 0.0_f32,
11770        afy: 0.0_f32,
11771        afz: 0.0_f32,
11772        yaw: 0.0_f32,
11773        yaw_rate: 0.0_f32,
11774        type_mask: PositionTargetTypemask::DEFAULT,
11775        coordinate_frame: MavFrame::DEFAULT,
11776    };
11777    #[cfg(feature = "arbitrary")]
11778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11779        use arbitrary::{Arbitrary, Unstructured};
11780        let mut buf = [0u8; 1024];
11781        rng.fill_bytes(&mut buf);
11782        let mut unstructured = Unstructured::new(&buf);
11783        Self::arbitrary(&mut unstructured).unwrap_or_default()
11784    }
11785}
11786impl Default for POSITION_TARGET_LOCAL_NED_DATA {
11787    fn default() -> Self {
11788        Self::DEFAULT.clone()
11789    }
11790}
11791impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
11792    type Message = MavMessage;
11793    const ID: u32 = 85u32;
11794    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
11795    const EXTRA_CRC: u8 = 140u8;
11796    const ENCODED_LEN: usize = 51usize;
11797    fn deser(
11798        _version: MavlinkVersion,
11799        __input: &[u8],
11800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11801        let avail_len = __input.len();
11802        let mut payload_buf = [0; Self::ENCODED_LEN];
11803        let mut buf = if avail_len < Self::ENCODED_LEN {
11804            payload_buf[0..avail_len].copy_from_slice(__input);
11805            Bytes::new(&payload_buf)
11806        } else {
11807            Bytes::new(__input)
11808        };
11809        let mut __struct = Self::default();
11810        __struct.time_boot_ms = buf.get_u32_le();
11811        __struct.x = buf.get_f32_le();
11812        __struct.y = buf.get_f32_le();
11813        __struct.z = buf.get_f32_le();
11814        __struct.vx = buf.get_f32_le();
11815        __struct.vy = buf.get_f32_le();
11816        __struct.vz = buf.get_f32_le();
11817        __struct.afx = buf.get_f32_le();
11818        __struct.afy = buf.get_f32_le();
11819        __struct.afz = buf.get_f32_le();
11820        __struct.yaw = buf.get_f32_le();
11821        __struct.yaw_rate = buf.get_f32_le();
11822        let tmp = buf.get_u16_le();
11823        __struct.type_mask = PositionTargetTypemask::from_bits(
11824            tmp & PositionTargetTypemask::all().bits(),
11825        )
11826        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11827            flag_type: "PositionTargetTypemask",
11828            value: tmp as u32,
11829        })?;
11830        let tmp = buf.get_u8();
11831        __struct.coordinate_frame =
11832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11833                enum_type: "MavFrame",
11834                value: tmp as u32,
11835            })?;
11836        Ok(__struct)
11837    }
11838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11839        let mut __tmp = BytesMut::new(bytes);
11840        #[allow(clippy::absurd_extreme_comparisons)]
11841        #[allow(unused_comparisons)]
11842        if __tmp.remaining() < Self::ENCODED_LEN {
11843            panic!(
11844                "buffer is too small (need {} bytes, but got {})",
11845                Self::ENCODED_LEN,
11846                __tmp.remaining(),
11847            )
11848        }
11849        __tmp.put_u32_le(self.time_boot_ms);
11850        __tmp.put_f32_le(self.x);
11851        __tmp.put_f32_le(self.y);
11852        __tmp.put_f32_le(self.z);
11853        __tmp.put_f32_le(self.vx);
11854        __tmp.put_f32_le(self.vy);
11855        __tmp.put_f32_le(self.vz);
11856        __tmp.put_f32_le(self.afx);
11857        __tmp.put_f32_le(self.afy);
11858        __tmp.put_f32_le(self.afz);
11859        __tmp.put_f32_le(self.yaw);
11860        __tmp.put_f32_le(self.yaw_rate);
11861        __tmp.put_u16_le(self.type_mask.bits());
11862        __tmp.put_u8(self.coordinate_frame as u8);
11863        if matches!(version, MavlinkVersion::V2) {
11864            let len = __tmp.len();
11865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11866        } else {
11867            __tmp.len()
11868        }
11869    }
11870}
11871#[doc = "id: 8013"]
11872#[doc = "Monitoring of power board status."]
11873#[derive(Debug, Clone, PartialEq)]
11874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11876pub struct SENS_POWER_BOARD_DATA {
11877    #[doc = "Timestamp"]
11878    pub timestamp: u64,
11879    #[doc = "Power board system voltage"]
11880    pub pwr_brd_system_volt: f32,
11881    #[doc = "Power board servo voltage"]
11882    pub pwr_brd_servo_volt: f32,
11883    #[doc = "Power board digital voltage"]
11884    pub pwr_brd_digital_volt: f32,
11885    #[doc = "Power board left motor current sensor"]
11886    pub pwr_brd_mot_l_amp: f32,
11887    #[doc = "Power board right motor current sensor"]
11888    pub pwr_brd_mot_r_amp: f32,
11889    #[doc = "Power board analog current sensor"]
11890    pub pwr_brd_analog_amp: f32,
11891    #[doc = "Power board digital current sensor"]
11892    pub pwr_brd_digital_amp: f32,
11893    #[doc = "Power board extension current sensor"]
11894    pub pwr_brd_ext_amp: f32,
11895    #[doc = "Power board aux current sensor"]
11896    pub pwr_brd_aux_amp: f32,
11897    #[doc = "Power board status register"]
11898    pub pwr_brd_status: u8,
11899    #[doc = "Power board leds status"]
11900    pub pwr_brd_led_status: u8,
11901}
11902impl SENS_POWER_BOARD_DATA {
11903    pub const ENCODED_LEN: usize = 46usize;
11904    pub const DEFAULT: Self = Self {
11905        timestamp: 0_u64,
11906        pwr_brd_system_volt: 0.0_f32,
11907        pwr_brd_servo_volt: 0.0_f32,
11908        pwr_brd_digital_volt: 0.0_f32,
11909        pwr_brd_mot_l_amp: 0.0_f32,
11910        pwr_brd_mot_r_amp: 0.0_f32,
11911        pwr_brd_analog_amp: 0.0_f32,
11912        pwr_brd_digital_amp: 0.0_f32,
11913        pwr_brd_ext_amp: 0.0_f32,
11914        pwr_brd_aux_amp: 0.0_f32,
11915        pwr_brd_status: 0_u8,
11916        pwr_brd_led_status: 0_u8,
11917    };
11918    #[cfg(feature = "arbitrary")]
11919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11920        use arbitrary::{Arbitrary, Unstructured};
11921        let mut buf = [0u8; 1024];
11922        rng.fill_bytes(&mut buf);
11923        let mut unstructured = Unstructured::new(&buf);
11924        Self::arbitrary(&mut unstructured).unwrap_or_default()
11925    }
11926}
11927impl Default for SENS_POWER_BOARD_DATA {
11928    fn default() -> Self {
11929        Self::DEFAULT.clone()
11930    }
11931}
11932impl MessageData for SENS_POWER_BOARD_DATA {
11933    type Message = MavMessage;
11934    const ID: u32 = 8013u32;
11935    const NAME: &'static str = "SENS_POWER_BOARD";
11936    const EXTRA_CRC: u8 = 222u8;
11937    const ENCODED_LEN: usize = 46usize;
11938    fn deser(
11939        _version: MavlinkVersion,
11940        __input: &[u8],
11941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11942        let avail_len = __input.len();
11943        let mut payload_buf = [0; Self::ENCODED_LEN];
11944        let mut buf = if avail_len < Self::ENCODED_LEN {
11945            payload_buf[0..avail_len].copy_from_slice(__input);
11946            Bytes::new(&payload_buf)
11947        } else {
11948            Bytes::new(__input)
11949        };
11950        let mut __struct = Self::default();
11951        __struct.timestamp = buf.get_u64_le();
11952        __struct.pwr_brd_system_volt = buf.get_f32_le();
11953        __struct.pwr_brd_servo_volt = buf.get_f32_le();
11954        __struct.pwr_brd_digital_volt = buf.get_f32_le();
11955        __struct.pwr_brd_mot_l_amp = buf.get_f32_le();
11956        __struct.pwr_brd_mot_r_amp = buf.get_f32_le();
11957        __struct.pwr_brd_analog_amp = buf.get_f32_le();
11958        __struct.pwr_brd_digital_amp = buf.get_f32_le();
11959        __struct.pwr_brd_ext_amp = buf.get_f32_le();
11960        __struct.pwr_brd_aux_amp = buf.get_f32_le();
11961        __struct.pwr_brd_status = buf.get_u8();
11962        __struct.pwr_brd_led_status = buf.get_u8();
11963        Ok(__struct)
11964    }
11965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11966        let mut __tmp = BytesMut::new(bytes);
11967        #[allow(clippy::absurd_extreme_comparisons)]
11968        #[allow(unused_comparisons)]
11969        if __tmp.remaining() < Self::ENCODED_LEN {
11970            panic!(
11971                "buffer is too small (need {} bytes, but got {})",
11972                Self::ENCODED_LEN,
11973                __tmp.remaining(),
11974            )
11975        }
11976        __tmp.put_u64_le(self.timestamp);
11977        __tmp.put_f32_le(self.pwr_brd_system_volt);
11978        __tmp.put_f32_le(self.pwr_brd_servo_volt);
11979        __tmp.put_f32_le(self.pwr_brd_digital_volt);
11980        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
11981        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
11982        __tmp.put_f32_le(self.pwr_brd_analog_amp);
11983        __tmp.put_f32_le(self.pwr_brd_digital_amp);
11984        __tmp.put_f32_le(self.pwr_brd_ext_amp);
11985        __tmp.put_f32_le(self.pwr_brd_aux_amp);
11986        __tmp.put_u8(self.pwr_brd_status);
11987        __tmp.put_u8(self.pwr_brd_led_status);
11988        if matches!(version, MavlinkVersion::V2) {
11989            let len = __tmp.len();
11990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11991        } else {
11992            __tmp.len()
11993        }
11994    }
11995}
11996#[doc = "id: 253"]
11997#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
11998#[derive(Debug, Clone, PartialEq)]
11999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12001pub struct STATUSTEXT_DATA {
12002    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
12003    pub severity: MavSeverity,
12004    #[doc = "Status text message, without null termination character"]
12005    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12006    pub text: [u8; 50],
12007    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
12008    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12009    pub id: u16,
12010    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
12011    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12012    pub chunk_seq: u8,
12013}
12014impl STATUSTEXT_DATA {
12015    pub const ENCODED_LEN: usize = 54usize;
12016    pub const DEFAULT: Self = Self {
12017        severity: MavSeverity::DEFAULT,
12018        text: [0_u8; 50usize],
12019        id: 0_u16,
12020        chunk_seq: 0_u8,
12021    };
12022    #[cfg(feature = "arbitrary")]
12023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12024        use arbitrary::{Arbitrary, Unstructured};
12025        let mut buf = [0u8; 1024];
12026        rng.fill_bytes(&mut buf);
12027        let mut unstructured = Unstructured::new(&buf);
12028        Self::arbitrary(&mut unstructured).unwrap_or_default()
12029    }
12030}
12031impl Default for STATUSTEXT_DATA {
12032    fn default() -> Self {
12033        Self::DEFAULT.clone()
12034    }
12035}
12036impl MessageData for STATUSTEXT_DATA {
12037    type Message = MavMessage;
12038    const ID: u32 = 253u32;
12039    const NAME: &'static str = "STATUSTEXT";
12040    const EXTRA_CRC: u8 = 83u8;
12041    const ENCODED_LEN: usize = 54usize;
12042    fn deser(
12043        _version: MavlinkVersion,
12044        __input: &[u8],
12045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12046        let avail_len = __input.len();
12047        let mut payload_buf = [0; Self::ENCODED_LEN];
12048        let mut buf = if avail_len < Self::ENCODED_LEN {
12049            payload_buf[0..avail_len].copy_from_slice(__input);
12050            Bytes::new(&payload_buf)
12051        } else {
12052            Bytes::new(__input)
12053        };
12054        let mut __struct = Self::default();
12055        let tmp = buf.get_u8();
12056        __struct.severity =
12057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12058                enum_type: "MavSeverity",
12059                value: tmp as u32,
12060            })?;
12061        for v in &mut __struct.text {
12062            let val = buf.get_u8();
12063            *v = val;
12064        }
12065        __struct.id = buf.get_u16_le();
12066        __struct.chunk_seq = buf.get_u8();
12067        Ok(__struct)
12068    }
12069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12070        let mut __tmp = BytesMut::new(bytes);
12071        #[allow(clippy::absurd_extreme_comparisons)]
12072        #[allow(unused_comparisons)]
12073        if __tmp.remaining() < Self::ENCODED_LEN {
12074            panic!(
12075                "buffer is too small (need {} bytes, but got {})",
12076                Self::ENCODED_LEN,
12077                __tmp.remaining(),
12078            )
12079        }
12080        __tmp.put_u8(self.severity as u8);
12081        for val in &self.text {
12082            __tmp.put_u8(*val);
12083        }
12084        __tmp.put_u16_le(self.id);
12085        __tmp.put_u8(self.chunk_seq);
12086        if matches!(version, MavlinkVersion::V2) {
12087            let len = __tmp.len();
12088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12089        } else {
12090            __tmp.len()
12091        }
12092    }
12093}
12094#[doc = "id: 27"]
12095#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
12096#[derive(Debug, Clone, PartialEq)]
12097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12099pub struct RAW_IMU_DATA {
12100    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12101    pub time_usec: u64,
12102    #[doc = "X acceleration (raw)"]
12103    pub xacc: i16,
12104    #[doc = "Y acceleration (raw)"]
12105    pub yacc: i16,
12106    #[doc = "Z acceleration (raw)"]
12107    pub zacc: i16,
12108    #[doc = "Angular speed around X axis (raw)"]
12109    pub xgyro: i16,
12110    #[doc = "Angular speed around Y axis (raw)"]
12111    pub ygyro: i16,
12112    #[doc = "Angular speed around Z axis (raw)"]
12113    pub zgyro: i16,
12114    #[doc = "X Magnetic field (raw)"]
12115    pub xmag: i16,
12116    #[doc = "Y Magnetic field (raw)"]
12117    pub ymag: i16,
12118    #[doc = "Z Magnetic field (raw)"]
12119    pub zmag: i16,
12120    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
12121    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12122    pub id: u8,
12123    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
12124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12125    pub temperature: i16,
12126}
12127impl RAW_IMU_DATA {
12128    pub const ENCODED_LEN: usize = 29usize;
12129    pub const DEFAULT: Self = Self {
12130        time_usec: 0_u64,
12131        xacc: 0_i16,
12132        yacc: 0_i16,
12133        zacc: 0_i16,
12134        xgyro: 0_i16,
12135        ygyro: 0_i16,
12136        zgyro: 0_i16,
12137        xmag: 0_i16,
12138        ymag: 0_i16,
12139        zmag: 0_i16,
12140        id: 0_u8,
12141        temperature: 0_i16,
12142    };
12143    #[cfg(feature = "arbitrary")]
12144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12145        use arbitrary::{Arbitrary, Unstructured};
12146        let mut buf = [0u8; 1024];
12147        rng.fill_bytes(&mut buf);
12148        let mut unstructured = Unstructured::new(&buf);
12149        Self::arbitrary(&mut unstructured).unwrap_or_default()
12150    }
12151}
12152impl Default for RAW_IMU_DATA {
12153    fn default() -> Self {
12154        Self::DEFAULT.clone()
12155    }
12156}
12157impl MessageData for RAW_IMU_DATA {
12158    type Message = MavMessage;
12159    const ID: u32 = 27u32;
12160    const NAME: &'static str = "RAW_IMU";
12161    const EXTRA_CRC: u8 = 144u8;
12162    const ENCODED_LEN: usize = 29usize;
12163    fn deser(
12164        _version: MavlinkVersion,
12165        __input: &[u8],
12166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12167        let avail_len = __input.len();
12168        let mut payload_buf = [0; Self::ENCODED_LEN];
12169        let mut buf = if avail_len < Self::ENCODED_LEN {
12170            payload_buf[0..avail_len].copy_from_slice(__input);
12171            Bytes::new(&payload_buf)
12172        } else {
12173            Bytes::new(__input)
12174        };
12175        let mut __struct = Self::default();
12176        __struct.time_usec = buf.get_u64_le();
12177        __struct.xacc = buf.get_i16_le();
12178        __struct.yacc = buf.get_i16_le();
12179        __struct.zacc = buf.get_i16_le();
12180        __struct.xgyro = buf.get_i16_le();
12181        __struct.ygyro = buf.get_i16_le();
12182        __struct.zgyro = buf.get_i16_le();
12183        __struct.xmag = buf.get_i16_le();
12184        __struct.ymag = buf.get_i16_le();
12185        __struct.zmag = buf.get_i16_le();
12186        __struct.id = buf.get_u8();
12187        __struct.temperature = buf.get_i16_le();
12188        Ok(__struct)
12189    }
12190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12191        let mut __tmp = BytesMut::new(bytes);
12192        #[allow(clippy::absurd_extreme_comparisons)]
12193        #[allow(unused_comparisons)]
12194        if __tmp.remaining() < Self::ENCODED_LEN {
12195            panic!(
12196                "buffer is too small (need {} bytes, but got {})",
12197                Self::ENCODED_LEN,
12198                __tmp.remaining(),
12199            )
12200        }
12201        __tmp.put_u64_le(self.time_usec);
12202        __tmp.put_i16_le(self.xacc);
12203        __tmp.put_i16_le(self.yacc);
12204        __tmp.put_i16_le(self.zacc);
12205        __tmp.put_i16_le(self.xgyro);
12206        __tmp.put_i16_le(self.ygyro);
12207        __tmp.put_i16_le(self.zgyro);
12208        __tmp.put_i16_le(self.xmag);
12209        __tmp.put_i16_le(self.ymag);
12210        __tmp.put_i16_le(self.zmag);
12211        __tmp.put_u8(self.id);
12212        __tmp.put_i16_le(self.temperature);
12213        if matches!(version, MavlinkVersion::V2) {
12214            let len = __tmp.len();
12215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12216        } else {
12217            __tmp.len()
12218        }
12219    }
12220}
12221#[doc = "id: 81"]
12222#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
12223#[derive(Debug, Clone, PartialEq)]
12224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12226pub struct MANUAL_SETPOINT_DATA {
12227    #[doc = "Timestamp (time since system boot)."]
12228    pub time_boot_ms: u32,
12229    #[doc = "Desired roll rate"]
12230    pub roll: f32,
12231    #[doc = "Desired pitch rate"]
12232    pub pitch: f32,
12233    #[doc = "Desired yaw rate"]
12234    pub yaw: f32,
12235    #[doc = "Collective thrust, normalized to 0 .. 1"]
12236    pub thrust: f32,
12237    #[doc = "Flight mode switch position, 0.. 255"]
12238    pub mode_switch: u8,
12239    #[doc = "Override mode switch position, 0.. 255"]
12240    pub manual_override_switch: u8,
12241}
12242impl MANUAL_SETPOINT_DATA {
12243    pub const ENCODED_LEN: usize = 22usize;
12244    pub const DEFAULT: Self = Self {
12245        time_boot_ms: 0_u32,
12246        roll: 0.0_f32,
12247        pitch: 0.0_f32,
12248        yaw: 0.0_f32,
12249        thrust: 0.0_f32,
12250        mode_switch: 0_u8,
12251        manual_override_switch: 0_u8,
12252    };
12253    #[cfg(feature = "arbitrary")]
12254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12255        use arbitrary::{Arbitrary, Unstructured};
12256        let mut buf = [0u8; 1024];
12257        rng.fill_bytes(&mut buf);
12258        let mut unstructured = Unstructured::new(&buf);
12259        Self::arbitrary(&mut unstructured).unwrap_or_default()
12260    }
12261}
12262impl Default for MANUAL_SETPOINT_DATA {
12263    fn default() -> Self {
12264        Self::DEFAULT.clone()
12265    }
12266}
12267impl MessageData for MANUAL_SETPOINT_DATA {
12268    type Message = MavMessage;
12269    const ID: u32 = 81u32;
12270    const NAME: &'static str = "MANUAL_SETPOINT";
12271    const EXTRA_CRC: u8 = 106u8;
12272    const ENCODED_LEN: usize = 22usize;
12273    fn deser(
12274        _version: MavlinkVersion,
12275        __input: &[u8],
12276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12277        let avail_len = __input.len();
12278        let mut payload_buf = [0; Self::ENCODED_LEN];
12279        let mut buf = if avail_len < Self::ENCODED_LEN {
12280            payload_buf[0..avail_len].copy_from_slice(__input);
12281            Bytes::new(&payload_buf)
12282        } else {
12283            Bytes::new(__input)
12284        };
12285        let mut __struct = Self::default();
12286        __struct.time_boot_ms = buf.get_u32_le();
12287        __struct.roll = buf.get_f32_le();
12288        __struct.pitch = buf.get_f32_le();
12289        __struct.yaw = buf.get_f32_le();
12290        __struct.thrust = buf.get_f32_le();
12291        __struct.mode_switch = buf.get_u8();
12292        __struct.manual_override_switch = buf.get_u8();
12293        Ok(__struct)
12294    }
12295    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12296        let mut __tmp = BytesMut::new(bytes);
12297        #[allow(clippy::absurd_extreme_comparisons)]
12298        #[allow(unused_comparisons)]
12299        if __tmp.remaining() < Self::ENCODED_LEN {
12300            panic!(
12301                "buffer is too small (need {} bytes, but got {})",
12302                Self::ENCODED_LEN,
12303                __tmp.remaining(),
12304            )
12305        }
12306        __tmp.put_u32_le(self.time_boot_ms);
12307        __tmp.put_f32_le(self.roll);
12308        __tmp.put_f32_le(self.pitch);
12309        __tmp.put_f32_le(self.yaw);
12310        __tmp.put_f32_le(self.thrust);
12311        __tmp.put_u8(self.mode_switch);
12312        __tmp.put_u8(self.manual_override_switch);
12313        if matches!(version, MavlinkVersion::V2) {
12314            let len = __tmp.len();
12315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12316        } else {
12317            __tmp.len()
12318        }
12319    }
12320}
12321#[doc = "id: 108"]
12322#[doc = "Status of simulation environment, if used."]
12323#[derive(Debug, Clone, PartialEq)]
12324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12326pub struct SIM_STATE_DATA {
12327    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
12328    pub q1: f32,
12329    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
12330    pub q2: f32,
12331    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
12332    pub q3: f32,
12333    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
12334    pub q4: f32,
12335    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
12336    pub roll: f32,
12337    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
12338    pub pitch: f32,
12339    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
12340    pub yaw: f32,
12341    #[doc = "X acceleration"]
12342    pub xacc: f32,
12343    #[doc = "Y acceleration"]
12344    pub yacc: f32,
12345    #[doc = "Z acceleration"]
12346    pub zacc: f32,
12347    #[doc = "Angular speed around X axis"]
12348    pub xgyro: f32,
12349    #[doc = "Angular speed around Y axis"]
12350    pub ygyro: f32,
12351    #[doc = "Angular speed around Z axis"]
12352    pub zgyro: f32,
12353    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
12354    pub lat: f32,
12355    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
12356    pub lon: f32,
12357    #[doc = "Altitude"]
12358    pub alt: f32,
12359    #[doc = "Horizontal position standard deviation"]
12360    pub std_dev_horz: f32,
12361    #[doc = "Vertical position standard deviation"]
12362    pub std_dev_vert: f32,
12363    #[doc = "True velocity in north direction in earth-fixed NED frame"]
12364    pub vn: f32,
12365    #[doc = "True velocity in east direction in earth-fixed NED frame"]
12366    pub ve: f32,
12367    #[doc = "True velocity in down direction in earth-fixed NED frame"]
12368    pub vd: f32,
12369    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
12370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12371    pub lat_int: i32,
12372    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
12373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12374    pub lon_int: i32,
12375}
12376impl SIM_STATE_DATA {
12377    pub const ENCODED_LEN: usize = 92usize;
12378    pub const DEFAULT: Self = Self {
12379        q1: 0.0_f32,
12380        q2: 0.0_f32,
12381        q3: 0.0_f32,
12382        q4: 0.0_f32,
12383        roll: 0.0_f32,
12384        pitch: 0.0_f32,
12385        yaw: 0.0_f32,
12386        xacc: 0.0_f32,
12387        yacc: 0.0_f32,
12388        zacc: 0.0_f32,
12389        xgyro: 0.0_f32,
12390        ygyro: 0.0_f32,
12391        zgyro: 0.0_f32,
12392        lat: 0.0_f32,
12393        lon: 0.0_f32,
12394        alt: 0.0_f32,
12395        std_dev_horz: 0.0_f32,
12396        std_dev_vert: 0.0_f32,
12397        vn: 0.0_f32,
12398        ve: 0.0_f32,
12399        vd: 0.0_f32,
12400        lat_int: 0_i32,
12401        lon_int: 0_i32,
12402    };
12403    #[cfg(feature = "arbitrary")]
12404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12405        use arbitrary::{Arbitrary, Unstructured};
12406        let mut buf = [0u8; 1024];
12407        rng.fill_bytes(&mut buf);
12408        let mut unstructured = Unstructured::new(&buf);
12409        Self::arbitrary(&mut unstructured).unwrap_or_default()
12410    }
12411}
12412impl Default for SIM_STATE_DATA {
12413    fn default() -> Self {
12414        Self::DEFAULT.clone()
12415    }
12416}
12417impl MessageData for SIM_STATE_DATA {
12418    type Message = MavMessage;
12419    const ID: u32 = 108u32;
12420    const NAME: &'static str = "SIM_STATE";
12421    const EXTRA_CRC: u8 = 32u8;
12422    const ENCODED_LEN: usize = 92usize;
12423    fn deser(
12424        _version: MavlinkVersion,
12425        __input: &[u8],
12426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12427        let avail_len = __input.len();
12428        let mut payload_buf = [0; Self::ENCODED_LEN];
12429        let mut buf = if avail_len < Self::ENCODED_LEN {
12430            payload_buf[0..avail_len].copy_from_slice(__input);
12431            Bytes::new(&payload_buf)
12432        } else {
12433            Bytes::new(__input)
12434        };
12435        let mut __struct = Self::default();
12436        __struct.q1 = buf.get_f32_le();
12437        __struct.q2 = buf.get_f32_le();
12438        __struct.q3 = buf.get_f32_le();
12439        __struct.q4 = buf.get_f32_le();
12440        __struct.roll = buf.get_f32_le();
12441        __struct.pitch = buf.get_f32_le();
12442        __struct.yaw = buf.get_f32_le();
12443        __struct.xacc = buf.get_f32_le();
12444        __struct.yacc = buf.get_f32_le();
12445        __struct.zacc = buf.get_f32_le();
12446        __struct.xgyro = buf.get_f32_le();
12447        __struct.ygyro = buf.get_f32_le();
12448        __struct.zgyro = buf.get_f32_le();
12449        __struct.lat = buf.get_f32_le();
12450        __struct.lon = buf.get_f32_le();
12451        __struct.alt = buf.get_f32_le();
12452        __struct.std_dev_horz = buf.get_f32_le();
12453        __struct.std_dev_vert = buf.get_f32_le();
12454        __struct.vn = buf.get_f32_le();
12455        __struct.ve = buf.get_f32_le();
12456        __struct.vd = buf.get_f32_le();
12457        __struct.lat_int = buf.get_i32_le();
12458        __struct.lon_int = buf.get_i32_le();
12459        Ok(__struct)
12460    }
12461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12462        let mut __tmp = BytesMut::new(bytes);
12463        #[allow(clippy::absurd_extreme_comparisons)]
12464        #[allow(unused_comparisons)]
12465        if __tmp.remaining() < Self::ENCODED_LEN {
12466            panic!(
12467                "buffer is too small (need {} bytes, but got {})",
12468                Self::ENCODED_LEN,
12469                __tmp.remaining(),
12470            )
12471        }
12472        __tmp.put_f32_le(self.q1);
12473        __tmp.put_f32_le(self.q2);
12474        __tmp.put_f32_le(self.q3);
12475        __tmp.put_f32_le(self.q4);
12476        __tmp.put_f32_le(self.roll);
12477        __tmp.put_f32_le(self.pitch);
12478        __tmp.put_f32_le(self.yaw);
12479        __tmp.put_f32_le(self.xacc);
12480        __tmp.put_f32_le(self.yacc);
12481        __tmp.put_f32_le(self.zacc);
12482        __tmp.put_f32_le(self.xgyro);
12483        __tmp.put_f32_le(self.ygyro);
12484        __tmp.put_f32_le(self.zgyro);
12485        __tmp.put_f32_le(self.lat);
12486        __tmp.put_f32_le(self.lon);
12487        __tmp.put_f32_le(self.alt);
12488        __tmp.put_f32_le(self.std_dev_horz);
12489        __tmp.put_f32_le(self.std_dev_vert);
12490        __tmp.put_f32_le(self.vn);
12491        __tmp.put_f32_le(self.ve);
12492        __tmp.put_f32_le(self.vd);
12493        __tmp.put_i32_le(self.lat_int);
12494        __tmp.put_i32_le(self.lon_int);
12495        if matches!(version, MavlinkVersion::V2) {
12496            let len = __tmp.len();
12497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12498        } else {
12499            __tmp.len()
12500        }
12501    }
12502}
12503#[doc = "id: 138"]
12504#[doc = "Motion capture attitude and position."]
12505#[derive(Debug, Clone, PartialEq)]
12506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12508pub struct ATT_POS_MOCAP_DATA {
12509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12510    pub time_usec: u64,
12511    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
12512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12513    pub q: [f32; 4],
12514    #[doc = "X position (NED)"]
12515    pub x: f32,
12516    #[doc = "Y position (NED)"]
12517    pub y: f32,
12518    #[doc = "Z position (NED)"]
12519    pub z: f32,
12520    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
12521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12522    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12523    pub covariance: [f32; 21],
12524}
12525impl ATT_POS_MOCAP_DATA {
12526    pub const ENCODED_LEN: usize = 120usize;
12527    pub const DEFAULT: Self = Self {
12528        time_usec: 0_u64,
12529        q: [0.0_f32; 4usize],
12530        x: 0.0_f32,
12531        y: 0.0_f32,
12532        z: 0.0_f32,
12533        covariance: [0.0_f32; 21usize],
12534    };
12535    #[cfg(feature = "arbitrary")]
12536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12537        use arbitrary::{Arbitrary, Unstructured};
12538        let mut buf = [0u8; 1024];
12539        rng.fill_bytes(&mut buf);
12540        let mut unstructured = Unstructured::new(&buf);
12541        Self::arbitrary(&mut unstructured).unwrap_or_default()
12542    }
12543}
12544impl Default for ATT_POS_MOCAP_DATA {
12545    fn default() -> Self {
12546        Self::DEFAULT.clone()
12547    }
12548}
12549impl MessageData for ATT_POS_MOCAP_DATA {
12550    type Message = MavMessage;
12551    const ID: u32 = 138u32;
12552    const NAME: &'static str = "ATT_POS_MOCAP";
12553    const EXTRA_CRC: u8 = 109u8;
12554    const ENCODED_LEN: usize = 120usize;
12555    fn deser(
12556        _version: MavlinkVersion,
12557        __input: &[u8],
12558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12559        let avail_len = __input.len();
12560        let mut payload_buf = [0; Self::ENCODED_LEN];
12561        let mut buf = if avail_len < Self::ENCODED_LEN {
12562            payload_buf[0..avail_len].copy_from_slice(__input);
12563            Bytes::new(&payload_buf)
12564        } else {
12565            Bytes::new(__input)
12566        };
12567        let mut __struct = Self::default();
12568        __struct.time_usec = buf.get_u64_le();
12569        for v in &mut __struct.q {
12570            let val = buf.get_f32_le();
12571            *v = val;
12572        }
12573        __struct.x = buf.get_f32_le();
12574        __struct.y = buf.get_f32_le();
12575        __struct.z = buf.get_f32_le();
12576        for v in &mut __struct.covariance {
12577            let val = buf.get_f32_le();
12578            *v = val;
12579        }
12580        Ok(__struct)
12581    }
12582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12583        let mut __tmp = BytesMut::new(bytes);
12584        #[allow(clippy::absurd_extreme_comparisons)]
12585        #[allow(unused_comparisons)]
12586        if __tmp.remaining() < Self::ENCODED_LEN {
12587            panic!(
12588                "buffer is too small (need {} bytes, but got {})",
12589                Self::ENCODED_LEN,
12590                __tmp.remaining(),
12591            )
12592        }
12593        __tmp.put_u64_le(self.time_usec);
12594        for val in &self.q {
12595            __tmp.put_f32_le(*val);
12596        }
12597        __tmp.put_f32_le(self.x);
12598        __tmp.put_f32_le(self.y);
12599        __tmp.put_f32_le(self.z);
12600        for val in &self.covariance {
12601            __tmp.put_f32_le(*val);
12602        }
12603        if matches!(version, MavlinkVersion::V2) {
12604            let len = __tmp.len();
12605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12606        } else {
12607            __tmp.len()
12608        }
12609    }
12610}
12611#[doc = "id: 270"]
12612#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
12613#[derive(Debug, Clone, PartialEq)]
12614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12616pub struct VIDEO_STREAM_STATUS_DATA {
12617    #[doc = "Frame rate"]
12618    pub framerate: f32,
12619    #[doc = "Bit rate"]
12620    pub bitrate: u32,
12621    #[doc = "Bitmap of stream status flags"]
12622    pub flags: VideoStreamStatusFlags,
12623    #[doc = "Horizontal resolution"]
12624    pub resolution_h: u16,
12625    #[doc = "Vertical resolution"]
12626    pub resolution_v: u16,
12627    #[doc = "Video image rotation clockwise"]
12628    pub rotation: u16,
12629    #[doc = "Horizontal Field of view"]
12630    pub hfov: u16,
12631    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
12632    pub stream_id: u8,
12633    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
12634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12635    pub camera_device_id: u8,
12636}
12637impl VIDEO_STREAM_STATUS_DATA {
12638    pub const ENCODED_LEN: usize = 20usize;
12639    pub const DEFAULT: Self = Self {
12640        framerate: 0.0_f32,
12641        bitrate: 0_u32,
12642        flags: VideoStreamStatusFlags::DEFAULT,
12643        resolution_h: 0_u16,
12644        resolution_v: 0_u16,
12645        rotation: 0_u16,
12646        hfov: 0_u16,
12647        stream_id: 0_u8,
12648        camera_device_id: 0_u8,
12649    };
12650    #[cfg(feature = "arbitrary")]
12651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12652        use arbitrary::{Arbitrary, Unstructured};
12653        let mut buf = [0u8; 1024];
12654        rng.fill_bytes(&mut buf);
12655        let mut unstructured = Unstructured::new(&buf);
12656        Self::arbitrary(&mut unstructured).unwrap_or_default()
12657    }
12658}
12659impl Default for VIDEO_STREAM_STATUS_DATA {
12660    fn default() -> Self {
12661        Self::DEFAULT.clone()
12662    }
12663}
12664impl MessageData for VIDEO_STREAM_STATUS_DATA {
12665    type Message = MavMessage;
12666    const ID: u32 = 270u32;
12667    const NAME: &'static str = "VIDEO_STREAM_STATUS";
12668    const EXTRA_CRC: u8 = 59u8;
12669    const ENCODED_LEN: usize = 20usize;
12670    fn deser(
12671        _version: MavlinkVersion,
12672        __input: &[u8],
12673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12674        let avail_len = __input.len();
12675        let mut payload_buf = [0; Self::ENCODED_LEN];
12676        let mut buf = if avail_len < Self::ENCODED_LEN {
12677            payload_buf[0..avail_len].copy_from_slice(__input);
12678            Bytes::new(&payload_buf)
12679        } else {
12680            Bytes::new(__input)
12681        };
12682        let mut __struct = Self::default();
12683        __struct.framerate = buf.get_f32_le();
12684        __struct.bitrate = buf.get_u32_le();
12685        let tmp = buf.get_u16_le();
12686        __struct.flags = VideoStreamStatusFlags::from_bits(
12687            tmp & VideoStreamStatusFlags::all().bits(),
12688        )
12689        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12690            flag_type: "VideoStreamStatusFlags",
12691            value: tmp as u32,
12692        })?;
12693        __struct.resolution_h = buf.get_u16_le();
12694        __struct.resolution_v = buf.get_u16_le();
12695        __struct.rotation = buf.get_u16_le();
12696        __struct.hfov = buf.get_u16_le();
12697        __struct.stream_id = buf.get_u8();
12698        __struct.camera_device_id = buf.get_u8();
12699        Ok(__struct)
12700    }
12701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12702        let mut __tmp = BytesMut::new(bytes);
12703        #[allow(clippy::absurd_extreme_comparisons)]
12704        #[allow(unused_comparisons)]
12705        if __tmp.remaining() < Self::ENCODED_LEN {
12706            panic!(
12707                "buffer is too small (need {} bytes, but got {})",
12708                Self::ENCODED_LEN,
12709                __tmp.remaining(),
12710            )
12711        }
12712        __tmp.put_f32_le(self.framerate);
12713        __tmp.put_u32_le(self.bitrate);
12714        __tmp.put_u16_le(self.flags.bits());
12715        __tmp.put_u16_le(self.resolution_h);
12716        __tmp.put_u16_le(self.resolution_v);
12717        __tmp.put_u16_le(self.rotation);
12718        __tmp.put_u16_le(self.hfov);
12719        __tmp.put_u8(self.stream_id);
12720        __tmp.put_u8(self.camera_device_id);
12721        if matches!(version, MavlinkVersion::V2) {
12722            let len = __tmp.len();
12723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12724        } else {
12725            __tmp.len()
12726        }
12727    }
12728}
12729#[doc = "id: 331"]
12730#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
12731#[derive(Debug, Clone, PartialEq)]
12732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12734pub struct ODOMETRY_DATA {
12735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12736    pub time_usec: u64,
12737    #[doc = "X Position"]
12738    pub x: f32,
12739    #[doc = "Y Position"]
12740    pub y: f32,
12741    #[doc = "Z Position"]
12742    pub z: f32,
12743    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
12744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12745    pub q: [f32; 4],
12746    #[doc = "X linear speed"]
12747    pub vx: f32,
12748    #[doc = "Y linear speed"]
12749    pub vy: f32,
12750    #[doc = "Z linear speed"]
12751    pub vz: f32,
12752    #[doc = "Roll angular speed"]
12753    pub rollspeed: f32,
12754    #[doc = "Pitch angular speed"]
12755    pub pitchspeed: f32,
12756    #[doc = "Yaw angular speed"]
12757    pub yawspeed: f32,
12758    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
12759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12760    pub pose_covariance: [f32; 21],
12761    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
12762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12763    pub velocity_covariance: [f32; 21],
12764    #[doc = "Coordinate frame of reference for the pose data."]
12765    pub frame_id: MavFrame,
12766    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
12767    pub child_frame_id: MavFrame,
12768    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
12769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12770    pub reset_counter: u8,
12771    #[doc = "Type of estimator that is providing the odometry."]
12772    #[cfg_attr(feature = "serde", serde(default))]
12773    pub estimator_type: MavEstimatorType,
12774    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
12775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12776    pub quality: i8,
12777}
12778impl ODOMETRY_DATA {
12779    pub const ENCODED_LEN: usize = 233usize;
12780    pub const DEFAULT: Self = Self {
12781        time_usec: 0_u64,
12782        x: 0.0_f32,
12783        y: 0.0_f32,
12784        z: 0.0_f32,
12785        q: [0.0_f32; 4usize],
12786        vx: 0.0_f32,
12787        vy: 0.0_f32,
12788        vz: 0.0_f32,
12789        rollspeed: 0.0_f32,
12790        pitchspeed: 0.0_f32,
12791        yawspeed: 0.0_f32,
12792        pose_covariance: [0.0_f32; 21usize],
12793        velocity_covariance: [0.0_f32; 21usize],
12794        frame_id: MavFrame::DEFAULT,
12795        child_frame_id: MavFrame::DEFAULT,
12796        reset_counter: 0_u8,
12797        estimator_type: MavEstimatorType::DEFAULT,
12798        quality: 0_i8,
12799    };
12800    #[cfg(feature = "arbitrary")]
12801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12802        use arbitrary::{Arbitrary, Unstructured};
12803        let mut buf = [0u8; 1024];
12804        rng.fill_bytes(&mut buf);
12805        let mut unstructured = Unstructured::new(&buf);
12806        Self::arbitrary(&mut unstructured).unwrap_or_default()
12807    }
12808}
12809impl Default for ODOMETRY_DATA {
12810    fn default() -> Self {
12811        Self::DEFAULT.clone()
12812    }
12813}
12814impl MessageData for ODOMETRY_DATA {
12815    type Message = MavMessage;
12816    const ID: u32 = 331u32;
12817    const NAME: &'static str = "ODOMETRY";
12818    const EXTRA_CRC: u8 = 91u8;
12819    const ENCODED_LEN: usize = 233usize;
12820    fn deser(
12821        _version: MavlinkVersion,
12822        __input: &[u8],
12823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12824        let avail_len = __input.len();
12825        let mut payload_buf = [0; Self::ENCODED_LEN];
12826        let mut buf = if avail_len < Self::ENCODED_LEN {
12827            payload_buf[0..avail_len].copy_from_slice(__input);
12828            Bytes::new(&payload_buf)
12829        } else {
12830            Bytes::new(__input)
12831        };
12832        let mut __struct = Self::default();
12833        __struct.time_usec = buf.get_u64_le();
12834        __struct.x = buf.get_f32_le();
12835        __struct.y = buf.get_f32_le();
12836        __struct.z = buf.get_f32_le();
12837        for v in &mut __struct.q {
12838            let val = buf.get_f32_le();
12839            *v = val;
12840        }
12841        __struct.vx = buf.get_f32_le();
12842        __struct.vy = buf.get_f32_le();
12843        __struct.vz = buf.get_f32_le();
12844        __struct.rollspeed = buf.get_f32_le();
12845        __struct.pitchspeed = buf.get_f32_le();
12846        __struct.yawspeed = buf.get_f32_le();
12847        for v in &mut __struct.pose_covariance {
12848            let val = buf.get_f32_le();
12849            *v = val;
12850        }
12851        for v in &mut __struct.velocity_covariance {
12852            let val = buf.get_f32_le();
12853            *v = val;
12854        }
12855        let tmp = buf.get_u8();
12856        __struct.frame_id =
12857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12858                enum_type: "MavFrame",
12859                value: tmp as u32,
12860            })?;
12861        let tmp = buf.get_u8();
12862        __struct.child_frame_id =
12863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12864                enum_type: "MavFrame",
12865                value: tmp as u32,
12866            })?;
12867        __struct.reset_counter = buf.get_u8();
12868        let tmp = buf.get_u8();
12869        __struct.estimator_type =
12870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12871                enum_type: "MavEstimatorType",
12872                value: tmp as u32,
12873            })?;
12874        __struct.quality = buf.get_i8();
12875        Ok(__struct)
12876    }
12877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12878        let mut __tmp = BytesMut::new(bytes);
12879        #[allow(clippy::absurd_extreme_comparisons)]
12880        #[allow(unused_comparisons)]
12881        if __tmp.remaining() < Self::ENCODED_LEN {
12882            panic!(
12883                "buffer is too small (need {} bytes, but got {})",
12884                Self::ENCODED_LEN,
12885                __tmp.remaining(),
12886            )
12887        }
12888        __tmp.put_u64_le(self.time_usec);
12889        __tmp.put_f32_le(self.x);
12890        __tmp.put_f32_le(self.y);
12891        __tmp.put_f32_le(self.z);
12892        for val in &self.q {
12893            __tmp.put_f32_le(*val);
12894        }
12895        __tmp.put_f32_le(self.vx);
12896        __tmp.put_f32_le(self.vy);
12897        __tmp.put_f32_le(self.vz);
12898        __tmp.put_f32_le(self.rollspeed);
12899        __tmp.put_f32_le(self.pitchspeed);
12900        __tmp.put_f32_le(self.yawspeed);
12901        for val in &self.pose_covariance {
12902            __tmp.put_f32_le(*val);
12903        }
12904        for val in &self.velocity_covariance {
12905            __tmp.put_f32_le(*val);
12906        }
12907        __tmp.put_u8(self.frame_id as u8);
12908        __tmp.put_u8(self.child_frame_id as u8);
12909        __tmp.put_u8(self.reset_counter);
12910        __tmp.put_u8(self.estimator_type as u8);
12911        __tmp.put_i8(self.quality);
12912        if matches!(version, MavlinkVersion::V2) {
12913            let len = __tmp.len();
12914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12915        } else {
12916            __tmp.len()
12917        }
12918    }
12919}
12920#[doc = "id: 6"]
12921#[doc = "Accept / deny control of this MAV."]
12922#[derive(Debug, Clone, PartialEq)]
12923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12925pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
12926    #[doc = "ID of the GCS this message"]
12927    pub gcs_system_id: u8,
12928    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
12929    pub control_request: u8,
12930    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
12931    pub ack: u8,
12932}
12933impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
12934    pub const ENCODED_LEN: usize = 3usize;
12935    pub const DEFAULT: Self = Self {
12936        gcs_system_id: 0_u8,
12937        control_request: 0_u8,
12938        ack: 0_u8,
12939    };
12940    #[cfg(feature = "arbitrary")]
12941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12942        use arbitrary::{Arbitrary, Unstructured};
12943        let mut buf = [0u8; 1024];
12944        rng.fill_bytes(&mut buf);
12945        let mut unstructured = Unstructured::new(&buf);
12946        Self::arbitrary(&mut unstructured).unwrap_or_default()
12947    }
12948}
12949impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
12950    fn default() -> Self {
12951        Self::DEFAULT.clone()
12952    }
12953}
12954impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
12955    type Message = MavMessage;
12956    const ID: u32 = 6u32;
12957    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
12958    const EXTRA_CRC: u8 = 104u8;
12959    const ENCODED_LEN: usize = 3usize;
12960    fn deser(
12961        _version: MavlinkVersion,
12962        __input: &[u8],
12963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12964        let avail_len = __input.len();
12965        let mut payload_buf = [0; Self::ENCODED_LEN];
12966        let mut buf = if avail_len < Self::ENCODED_LEN {
12967            payload_buf[0..avail_len].copy_from_slice(__input);
12968            Bytes::new(&payload_buf)
12969        } else {
12970            Bytes::new(__input)
12971        };
12972        let mut __struct = Self::default();
12973        __struct.gcs_system_id = buf.get_u8();
12974        __struct.control_request = buf.get_u8();
12975        __struct.ack = buf.get_u8();
12976        Ok(__struct)
12977    }
12978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12979        let mut __tmp = BytesMut::new(bytes);
12980        #[allow(clippy::absurd_extreme_comparisons)]
12981        #[allow(unused_comparisons)]
12982        if __tmp.remaining() < Self::ENCODED_LEN {
12983            panic!(
12984                "buffer is too small (need {} bytes, but got {})",
12985                Self::ENCODED_LEN,
12986                __tmp.remaining(),
12987            )
12988        }
12989        __tmp.put_u8(self.gcs_system_id);
12990        __tmp.put_u8(self.control_request);
12991        __tmp.put_u8(self.ack);
12992        if matches!(version, MavlinkVersion::V2) {
12993            let len = __tmp.len();
12994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12995        } else {
12996            __tmp.len()
12997        }
12998    }
12999}
13000#[doc = "id: 243"]
13001#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
13002#[derive(Debug, Clone, PartialEq)]
13003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13005pub struct SET_HOME_POSITION_DATA {
13006    #[doc = "Latitude (WGS84)"]
13007    pub latitude: i32,
13008    #[doc = "Longitude (WGS84)"]
13009    pub longitude: i32,
13010    #[doc = "Altitude (MSL). Positive for up."]
13011    pub altitude: i32,
13012    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
13013    pub x: f32,
13014    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
13015    pub y: f32,
13016    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
13017    pub z: f32,
13018    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
13019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13020    pub q: [f32; 4],
13021    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
13022    pub approach_x: f32,
13023    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
13024    pub approach_y: f32,
13025    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
13026    pub approach_z: f32,
13027    #[doc = "System ID."]
13028    pub target_system: u8,
13029    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13030    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13031    pub time_usec: u64,
13032}
13033impl SET_HOME_POSITION_DATA {
13034    pub const ENCODED_LEN: usize = 61usize;
13035    pub const DEFAULT: Self = Self {
13036        latitude: 0_i32,
13037        longitude: 0_i32,
13038        altitude: 0_i32,
13039        x: 0.0_f32,
13040        y: 0.0_f32,
13041        z: 0.0_f32,
13042        q: [0.0_f32; 4usize],
13043        approach_x: 0.0_f32,
13044        approach_y: 0.0_f32,
13045        approach_z: 0.0_f32,
13046        target_system: 0_u8,
13047        time_usec: 0_u64,
13048    };
13049    #[cfg(feature = "arbitrary")]
13050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13051        use arbitrary::{Arbitrary, Unstructured};
13052        let mut buf = [0u8; 1024];
13053        rng.fill_bytes(&mut buf);
13054        let mut unstructured = Unstructured::new(&buf);
13055        Self::arbitrary(&mut unstructured).unwrap_or_default()
13056    }
13057}
13058impl Default for SET_HOME_POSITION_DATA {
13059    fn default() -> Self {
13060        Self::DEFAULT.clone()
13061    }
13062}
13063impl MessageData for SET_HOME_POSITION_DATA {
13064    type Message = MavMessage;
13065    const ID: u32 = 243u32;
13066    const NAME: &'static str = "SET_HOME_POSITION";
13067    const EXTRA_CRC: u8 = 85u8;
13068    const ENCODED_LEN: usize = 61usize;
13069    fn deser(
13070        _version: MavlinkVersion,
13071        __input: &[u8],
13072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13073        let avail_len = __input.len();
13074        let mut payload_buf = [0; Self::ENCODED_LEN];
13075        let mut buf = if avail_len < Self::ENCODED_LEN {
13076            payload_buf[0..avail_len].copy_from_slice(__input);
13077            Bytes::new(&payload_buf)
13078        } else {
13079            Bytes::new(__input)
13080        };
13081        let mut __struct = Self::default();
13082        __struct.latitude = buf.get_i32_le();
13083        __struct.longitude = buf.get_i32_le();
13084        __struct.altitude = buf.get_i32_le();
13085        __struct.x = buf.get_f32_le();
13086        __struct.y = buf.get_f32_le();
13087        __struct.z = buf.get_f32_le();
13088        for v in &mut __struct.q {
13089            let val = buf.get_f32_le();
13090            *v = val;
13091        }
13092        __struct.approach_x = buf.get_f32_le();
13093        __struct.approach_y = buf.get_f32_le();
13094        __struct.approach_z = buf.get_f32_le();
13095        __struct.target_system = buf.get_u8();
13096        __struct.time_usec = buf.get_u64_le();
13097        Ok(__struct)
13098    }
13099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13100        let mut __tmp = BytesMut::new(bytes);
13101        #[allow(clippy::absurd_extreme_comparisons)]
13102        #[allow(unused_comparisons)]
13103        if __tmp.remaining() < Self::ENCODED_LEN {
13104            panic!(
13105                "buffer is too small (need {} bytes, but got {})",
13106                Self::ENCODED_LEN,
13107                __tmp.remaining(),
13108            )
13109        }
13110        __tmp.put_i32_le(self.latitude);
13111        __tmp.put_i32_le(self.longitude);
13112        __tmp.put_i32_le(self.altitude);
13113        __tmp.put_f32_le(self.x);
13114        __tmp.put_f32_le(self.y);
13115        __tmp.put_f32_le(self.z);
13116        for val in &self.q {
13117            __tmp.put_f32_le(*val);
13118        }
13119        __tmp.put_f32_le(self.approach_x);
13120        __tmp.put_f32_le(self.approach_y);
13121        __tmp.put_f32_le(self.approach_z);
13122        __tmp.put_u8(self.target_system);
13123        __tmp.put_u64_le(self.time_usec);
13124        if matches!(version, MavlinkVersion::V2) {
13125            let len = __tmp.len();
13126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13127        } else {
13128            __tmp.len()
13129        }
13130    }
13131}
13132#[doc = "id: 54"]
13133#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
13134#[derive(Debug, Clone, PartialEq)]
13135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13137pub struct SAFETY_SET_ALLOWED_AREA_DATA {
13138    #[doc = "x position 1 / Latitude 1"]
13139    pub p1x: f32,
13140    #[doc = "y position 1 / Longitude 1"]
13141    pub p1y: f32,
13142    #[doc = "z position 1 / Altitude 1"]
13143    pub p1z: f32,
13144    #[doc = "x position 2 / Latitude 2"]
13145    pub p2x: f32,
13146    #[doc = "y position 2 / Longitude 2"]
13147    pub p2y: f32,
13148    #[doc = "z position 2 / Altitude 2"]
13149    pub p2z: f32,
13150    #[doc = "System ID"]
13151    pub target_system: u8,
13152    #[doc = "Component ID"]
13153    pub target_component: u8,
13154    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
13155    pub frame: MavFrame,
13156}
13157impl SAFETY_SET_ALLOWED_AREA_DATA {
13158    pub const ENCODED_LEN: usize = 27usize;
13159    pub const DEFAULT: Self = Self {
13160        p1x: 0.0_f32,
13161        p1y: 0.0_f32,
13162        p1z: 0.0_f32,
13163        p2x: 0.0_f32,
13164        p2y: 0.0_f32,
13165        p2z: 0.0_f32,
13166        target_system: 0_u8,
13167        target_component: 0_u8,
13168        frame: MavFrame::DEFAULT,
13169    };
13170    #[cfg(feature = "arbitrary")]
13171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13172        use arbitrary::{Arbitrary, Unstructured};
13173        let mut buf = [0u8; 1024];
13174        rng.fill_bytes(&mut buf);
13175        let mut unstructured = Unstructured::new(&buf);
13176        Self::arbitrary(&mut unstructured).unwrap_or_default()
13177    }
13178}
13179impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
13180    fn default() -> Self {
13181        Self::DEFAULT.clone()
13182    }
13183}
13184impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
13185    type Message = MavMessage;
13186    const ID: u32 = 54u32;
13187    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
13188    const EXTRA_CRC: u8 = 15u8;
13189    const ENCODED_LEN: usize = 27usize;
13190    fn deser(
13191        _version: MavlinkVersion,
13192        __input: &[u8],
13193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13194        let avail_len = __input.len();
13195        let mut payload_buf = [0; Self::ENCODED_LEN];
13196        let mut buf = if avail_len < Self::ENCODED_LEN {
13197            payload_buf[0..avail_len].copy_from_slice(__input);
13198            Bytes::new(&payload_buf)
13199        } else {
13200            Bytes::new(__input)
13201        };
13202        let mut __struct = Self::default();
13203        __struct.p1x = buf.get_f32_le();
13204        __struct.p1y = buf.get_f32_le();
13205        __struct.p1z = buf.get_f32_le();
13206        __struct.p2x = buf.get_f32_le();
13207        __struct.p2y = buf.get_f32_le();
13208        __struct.p2z = buf.get_f32_le();
13209        __struct.target_system = buf.get_u8();
13210        __struct.target_component = buf.get_u8();
13211        let tmp = buf.get_u8();
13212        __struct.frame =
13213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13214                enum_type: "MavFrame",
13215                value: tmp as u32,
13216            })?;
13217        Ok(__struct)
13218    }
13219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13220        let mut __tmp = BytesMut::new(bytes);
13221        #[allow(clippy::absurd_extreme_comparisons)]
13222        #[allow(unused_comparisons)]
13223        if __tmp.remaining() < Self::ENCODED_LEN {
13224            panic!(
13225                "buffer is too small (need {} bytes, but got {})",
13226                Self::ENCODED_LEN,
13227                __tmp.remaining(),
13228            )
13229        }
13230        __tmp.put_f32_le(self.p1x);
13231        __tmp.put_f32_le(self.p1y);
13232        __tmp.put_f32_le(self.p1z);
13233        __tmp.put_f32_le(self.p2x);
13234        __tmp.put_f32_le(self.p2y);
13235        __tmp.put_f32_le(self.p2z);
13236        __tmp.put_u8(self.target_system);
13237        __tmp.put_u8(self.target_component);
13238        __tmp.put_u8(self.frame as u8);
13239        if matches!(version, MavlinkVersion::V2) {
13240            let len = __tmp.len();
13241            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13242        } else {
13243            __tmp.len()
13244        }
13245    }
13246}
13247#[doc = "id: 5"]
13248#[doc = "Request to control this MAV."]
13249#[derive(Debug, Clone, PartialEq)]
13250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13252pub struct CHANGE_OPERATOR_CONTROL_DATA {
13253    #[doc = "System the GCS requests control for"]
13254    pub target_system: u8,
13255    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
13256    pub control_request: u8,
13257    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
13258    pub version: u8,
13259    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
13260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13261    pub passkey: [u8; 25],
13262}
13263impl CHANGE_OPERATOR_CONTROL_DATA {
13264    pub const ENCODED_LEN: usize = 28usize;
13265    pub const DEFAULT: Self = Self {
13266        target_system: 0_u8,
13267        control_request: 0_u8,
13268        version: 0_u8,
13269        passkey: [0_u8; 25usize],
13270    };
13271    #[cfg(feature = "arbitrary")]
13272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13273        use arbitrary::{Arbitrary, Unstructured};
13274        let mut buf = [0u8; 1024];
13275        rng.fill_bytes(&mut buf);
13276        let mut unstructured = Unstructured::new(&buf);
13277        Self::arbitrary(&mut unstructured).unwrap_or_default()
13278    }
13279}
13280impl Default for CHANGE_OPERATOR_CONTROL_DATA {
13281    fn default() -> Self {
13282        Self::DEFAULT.clone()
13283    }
13284}
13285impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
13286    type Message = MavMessage;
13287    const ID: u32 = 5u32;
13288    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
13289    const EXTRA_CRC: u8 = 217u8;
13290    const ENCODED_LEN: usize = 28usize;
13291    fn deser(
13292        _version: MavlinkVersion,
13293        __input: &[u8],
13294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13295        let avail_len = __input.len();
13296        let mut payload_buf = [0; Self::ENCODED_LEN];
13297        let mut buf = if avail_len < Self::ENCODED_LEN {
13298            payload_buf[0..avail_len].copy_from_slice(__input);
13299            Bytes::new(&payload_buf)
13300        } else {
13301            Bytes::new(__input)
13302        };
13303        let mut __struct = Self::default();
13304        __struct.target_system = buf.get_u8();
13305        __struct.control_request = buf.get_u8();
13306        __struct.version = buf.get_u8();
13307        for v in &mut __struct.passkey {
13308            let val = buf.get_u8();
13309            *v = val;
13310        }
13311        Ok(__struct)
13312    }
13313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13314        let mut __tmp = BytesMut::new(bytes);
13315        #[allow(clippy::absurd_extreme_comparisons)]
13316        #[allow(unused_comparisons)]
13317        if __tmp.remaining() < Self::ENCODED_LEN {
13318            panic!(
13319                "buffer is too small (need {} bytes, but got {})",
13320                Self::ENCODED_LEN,
13321                __tmp.remaining(),
13322            )
13323        }
13324        __tmp.put_u8(self.target_system);
13325        __tmp.put_u8(self.control_request);
13326        __tmp.put_u8(self.version);
13327        for val in &self.passkey {
13328            __tmp.put_u8(*val);
13329        }
13330        if matches!(version, MavlinkVersion::V2) {
13331            let len = __tmp.len();
13332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13333        } else {
13334            __tmp.len()
13335        }
13336    }
13337}
13338#[doc = "id: 9000"]
13339#[doc = "Cumulative distance traveled for each reported wheel."]
13340#[derive(Debug, Clone, PartialEq)]
13341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13343pub struct WHEEL_DISTANCE_DATA {
13344    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
13345    pub time_usec: u64,
13346    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
13347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13348    pub distance: [f64; 16],
13349    #[doc = "Number of wheels reported."]
13350    pub count: u8,
13351}
13352impl WHEEL_DISTANCE_DATA {
13353    pub const ENCODED_LEN: usize = 137usize;
13354    pub const DEFAULT: Self = Self {
13355        time_usec: 0_u64,
13356        distance: [0.0_f64; 16usize],
13357        count: 0_u8,
13358    };
13359    #[cfg(feature = "arbitrary")]
13360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13361        use arbitrary::{Arbitrary, Unstructured};
13362        let mut buf = [0u8; 1024];
13363        rng.fill_bytes(&mut buf);
13364        let mut unstructured = Unstructured::new(&buf);
13365        Self::arbitrary(&mut unstructured).unwrap_or_default()
13366    }
13367}
13368impl Default for WHEEL_DISTANCE_DATA {
13369    fn default() -> Self {
13370        Self::DEFAULT.clone()
13371    }
13372}
13373impl MessageData for WHEEL_DISTANCE_DATA {
13374    type Message = MavMessage;
13375    const ID: u32 = 9000u32;
13376    const NAME: &'static str = "WHEEL_DISTANCE";
13377    const EXTRA_CRC: u8 = 113u8;
13378    const ENCODED_LEN: usize = 137usize;
13379    fn deser(
13380        _version: MavlinkVersion,
13381        __input: &[u8],
13382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13383        let avail_len = __input.len();
13384        let mut payload_buf = [0; Self::ENCODED_LEN];
13385        let mut buf = if avail_len < Self::ENCODED_LEN {
13386            payload_buf[0..avail_len].copy_from_slice(__input);
13387            Bytes::new(&payload_buf)
13388        } else {
13389            Bytes::new(__input)
13390        };
13391        let mut __struct = Self::default();
13392        __struct.time_usec = buf.get_u64_le();
13393        for v in &mut __struct.distance {
13394            let val = buf.get_f64_le();
13395            *v = val;
13396        }
13397        __struct.count = buf.get_u8();
13398        Ok(__struct)
13399    }
13400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13401        let mut __tmp = BytesMut::new(bytes);
13402        #[allow(clippy::absurd_extreme_comparisons)]
13403        #[allow(unused_comparisons)]
13404        if __tmp.remaining() < Self::ENCODED_LEN {
13405            panic!(
13406                "buffer is too small (need {} bytes, but got {})",
13407                Self::ENCODED_LEN,
13408                __tmp.remaining(),
13409            )
13410        }
13411        __tmp.put_u64_le(self.time_usec);
13412        for val in &self.distance {
13413            __tmp.put_f64_le(*val);
13414        }
13415        __tmp.put_u8(self.count);
13416        if matches!(version, MavlinkVersion::V2) {
13417            let len = __tmp.len();
13418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13419        } else {
13420            __tmp.len()
13421        }
13422    }
13423}
13424#[doc = "id: 9005"]
13425#[doc = "Winch status."]
13426#[derive(Debug, Clone, PartialEq)]
13427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13429pub struct WINCH_STATUS_DATA {
13430    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
13431    pub time_usec: u64,
13432    #[doc = "Length of line released. NaN if unknown"]
13433    pub line_length: f32,
13434    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
13435    pub speed: f32,
13436    #[doc = "Tension on the line. NaN if unknown"]
13437    pub tension: f32,
13438    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
13439    pub voltage: f32,
13440    #[doc = "Current draw from the winch. NaN if unknown"]
13441    pub current: f32,
13442    #[doc = "Status flags"]
13443    pub status: MavWinchStatusFlag,
13444    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
13445    pub temperature: i16,
13446}
13447impl WINCH_STATUS_DATA {
13448    pub const ENCODED_LEN: usize = 34usize;
13449    pub const DEFAULT: Self = Self {
13450        time_usec: 0_u64,
13451        line_length: 0.0_f32,
13452        speed: 0.0_f32,
13453        tension: 0.0_f32,
13454        voltage: 0.0_f32,
13455        current: 0.0_f32,
13456        status: MavWinchStatusFlag::DEFAULT,
13457        temperature: 0_i16,
13458    };
13459    #[cfg(feature = "arbitrary")]
13460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13461        use arbitrary::{Arbitrary, Unstructured};
13462        let mut buf = [0u8; 1024];
13463        rng.fill_bytes(&mut buf);
13464        let mut unstructured = Unstructured::new(&buf);
13465        Self::arbitrary(&mut unstructured).unwrap_or_default()
13466    }
13467}
13468impl Default for WINCH_STATUS_DATA {
13469    fn default() -> Self {
13470        Self::DEFAULT.clone()
13471    }
13472}
13473impl MessageData for WINCH_STATUS_DATA {
13474    type Message = MavMessage;
13475    const ID: u32 = 9005u32;
13476    const NAME: &'static str = "WINCH_STATUS";
13477    const EXTRA_CRC: u8 = 117u8;
13478    const ENCODED_LEN: usize = 34usize;
13479    fn deser(
13480        _version: MavlinkVersion,
13481        __input: &[u8],
13482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13483        let avail_len = __input.len();
13484        let mut payload_buf = [0; Self::ENCODED_LEN];
13485        let mut buf = if avail_len < Self::ENCODED_LEN {
13486            payload_buf[0..avail_len].copy_from_slice(__input);
13487            Bytes::new(&payload_buf)
13488        } else {
13489            Bytes::new(__input)
13490        };
13491        let mut __struct = Self::default();
13492        __struct.time_usec = buf.get_u64_le();
13493        __struct.line_length = buf.get_f32_le();
13494        __struct.speed = buf.get_f32_le();
13495        __struct.tension = buf.get_f32_le();
13496        __struct.voltage = buf.get_f32_le();
13497        __struct.current = buf.get_f32_le();
13498        let tmp = buf.get_u32_le();
13499        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
13500            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13501                flag_type: "MavWinchStatusFlag",
13502                value: tmp as u32,
13503            })?;
13504        __struct.temperature = buf.get_i16_le();
13505        Ok(__struct)
13506    }
13507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13508        let mut __tmp = BytesMut::new(bytes);
13509        #[allow(clippy::absurd_extreme_comparisons)]
13510        #[allow(unused_comparisons)]
13511        if __tmp.remaining() < Self::ENCODED_LEN {
13512            panic!(
13513                "buffer is too small (need {} bytes, but got {})",
13514                Self::ENCODED_LEN,
13515                __tmp.remaining(),
13516            )
13517        }
13518        __tmp.put_u64_le(self.time_usec);
13519        __tmp.put_f32_le(self.line_length);
13520        __tmp.put_f32_le(self.speed);
13521        __tmp.put_f32_le(self.tension);
13522        __tmp.put_f32_le(self.voltage);
13523        __tmp.put_f32_le(self.current);
13524        __tmp.put_u32_le(self.status.bits());
13525        __tmp.put_i16_le(self.temperature);
13526        if matches!(version, MavlinkVersion::V2) {
13527            let len = __tmp.len();
13528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13529        } else {
13530            __tmp.len()
13531        }
13532    }
13533}
13534#[doc = "id: 261"]
13535#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
13536#[derive(Debug, Clone, PartialEq)]
13537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13539pub struct STORAGE_INFORMATION_DATA {
13540    #[doc = "Timestamp (time since system boot)."]
13541    pub time_boot_ms: u32,
13542    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
13543    pub total_capacity: f32,
13544    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
13545    pub used_capacity: f32,
13546    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
13547    pub available_capacity: f32,
13548    #[doc = "Read speed."]
13549    pub read_speed: f32,
13550    #[doc = "Write speed."]
13551    pub write_speed: f32,
13552    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
13553    pub storage_id: u8,
13554    #[doc = "Number of storage devices"]
13555    pub storage_count: u8,
13556    #[doc = "Status of storage"]
13557    pub status: StorageStatus,
13558    #[doc = "Type of storage"]
13559    #[cfg_attr(feature = "serde", serde(default))]
13560    pub mavtype: StorageType,
13561    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
13562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13564    pub name: [u8; 32],
13565    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
13566    #[cfg_attr(feature = "serde", serde(default))]
13567    pub storage_usage: StorageUsageFlag,
13568}
13569impl STORAGE_INFORMATION_DATA {
13570    pub const ENCODED_LEN: usize = 61usize;
13571    pub const DEFAULT: Self = Self {
13572        time_boot_ms: 0_u32,
13573        total_capacity: 0.0_f32,
13574        used_capacity: 0.0_f32,
13575        available_capacity: 0.0_f32,
13576        read_speed: 0.0_f32,
13577        write_speed: 0.0_f32,
13578        storage_id: 0_u8,
13579        storage_count: 0_u8,
13580        status: StorageStatus::DEFAULT,
13581        mavtype: StorageType::DEFAULT,
13582        name: [0_u8; 32usize],
13583        storage_usage: StorageUsageFlag::DEFAULT,
13584    };
13585    #[cfg(feature = "arbitrary")]
13586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13587        use arbitrary::{Arbitrary, Unstructured};
13588        let mut buf = [0u8; 1024];
13589        rng.fill_bytes(&mut buf);
13590        let mut unstructured = Unstructured::new(&buf);
13591        Self::arbitrary(&mut unstructured).unwrap_or_default()
13592    }
13593}
13594impl Default for STORAGE_INFORMATION_DATA {
13595    fn default() -> Self {
13596        Self::DEFAULT.clone()
13597    }
13598}
13599impl MessageData for STORAGE_INFORMATION_DATA {
13600    type Message = MavMessage;
13601    const ID: u32 = 261u32;
13602    const NAME: &'static str = "STORAGE_INFORMATION";
13603    const EXTRA_CRC: u8 = 179u8;
13604    const ENCODED_LEN: usize = 61usize;
13605    fn deser(
13606        _version: MavlinkVersion,
13607        __input: &[u8],
13608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13609        let avail_len = __input.len();
13610        let mut payload_buf = [0; Self::ENCODED_LEN];
13611        let mut buf = if avail_len < Self::ENCODED_LEN {
13612            payload_buf[0..avail_len].copy_from_slice(__input);
13613            Bytes::new(&payload_buf)
13614        } else {
13615            Bytes::new(__input)
13616        };
13617        let mut __struct = Self::default();
13618        __struct.time_boot_ms = buf.get_u32_le();
13619        __struct.total_capacity = buf.get_f32_le();
13620        __struct.used_capacity = buf.get_f32_le();
13621        __struct.available_capacity = buf.get_f32_le();
13622        __struct.read_speed = buf.get_f32_le();
13623        __struct.write_speed = buf.get_f32_le();
13624        __struct.storage_id = buf.get_u8();
13625        __struct.storage_count = buf.get_u8();
13626        let tmp = buf.get_u8();
13627        __struct.status =
13628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13629                enum_type: "StorageStatus",
13630                value: tmp as u32,
13631            })?;
13632        let tmp = buf.get_u8();
13633        __struct.mavtype =
13634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13635                enum_type: "StorageType",
13636                value: tmp as u32,
13637            })?;
13638        for v in &mut __struct.name {
13639            let val = buf.get_u8();
13640            *v = val;
13641        }
13642        let tmp = buf.get_u8();
13643        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
13644            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13645                flag_type: "StorageUsageFlag",
13646                value: tmp as u32,
13647            })?;
13648        Ok(__struct)
13649    }
13650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13651        let mut __tmp = BytesMut::new(bytes);
13652        #[allow(clippy::absurd_extreme_comparisons)]
13653        #[allow(unused_comparisons)]
13654        if __tmp.remaining() < Self::ENCODED_LEN {
13655            panic!(
13656                "buffer is too small (need {} bytes, but got {})",
13657                Self::ENCODED_LEN,
13658                __tmp.remaining(),
13659            )
13660        }
13661        __tmp.put_u32_le(self.time_boot_ms);
13662        __tmp.put_f32_le(self.total_capacity);
13663        __tmp.put_f32_le(self.used_capacity);
13664        __tmp.put_f32_le(self.available_capacity);
13665        __tmp.put_f32_le(self.read_speed);
13666        __tmp.put_f32_le(self.write_speed);
13667        __tmp.put_u8(self.storage_id);
13668        __tmp.put_u8(self.storage_count);
13669        __tmp.put_u8(self.status as u8);
13670        __tmp.put_u8(self.mavtype as u8);
13671        for val in &self.name {
13672            __tmp.put_u8(*val);
13673        }
13674        __tmp.put_u8(self.storage_usage.bits());
13675        if matches!(version, MavlinkVersion::V2) {
13676            let len = __tmp.len();
13677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13678        } else {
13679            __tmp.len()
13680        }
13681    }
13682}
13683#[doc = "id: 136"]
13684#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
13685#[derive(Debug, Clone, PartialEq)]
13686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13688pub struct TERRAIN_REPORT_DATA {
13689    #[doc = "Latitude"]
13690    pub lat: i32,
13691    #[doc = "Longitude"]
13692    pub lon: i32,
13693    #[doc = "Terrain height MSL"]
13694    pub terrain_height: f32,
13695    #[doc = "Current vehicle height above lat/lon terrain height"]
13696    pub current_height: f32,
13697    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
13698    pub spacing: u16,
13699    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
13700    pub pending: u16,
13701    #[doc = "Number of 4x4 terrain blocks in memory"]
13702    pub loaded: u16,
13703}
13704impl TERRAIN_REPORT_DATA {
13705    pub const ENCODED_LEN: usize = 22usize;
13706    pub const DEFAULT: Self = Self {
13707        lat: 0_i32,
13708        lon: 0_i32,
13709        terrain_height: 0.0_f32,
13710        current_height: 0.0_f32,
13711        spacing: 0_u16,
13712        pending: 0_u16,
13713        loaded: 0_u16,
13714    };
13715    #[cfg(feature = "arbitrary")]
13716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13717        use arbitrary::{Arbitrary, Unstructured};
13718        let mut buf = [0u8; 1024];
13719        rng.fill_bytes(&mut buf);
13720        let mut unstructured = Unstructured::new(&buf);
13721        Self::arbitrary(&mut unstructured).unwrap_or_default()
13722    }
13723}
13724impl Default for TERRAIN_REPORT_DATA {
13725    fn default() -> Self {
13726        Self::DEFAULT.clone()
13727    }
13728}
13729impl MessageData for TERRAIN_REPORT_DATA {
13730    type Message = MavMessage;
13731    const ID: u32 = 136u32;
13732    const NAME: &'static str = "TERRAIN_REPORT";
13733    const EXTRA_CRC: u8 = 1u8;
13734    const ENCODED_LEN: usize = 22usize;
13735    fn deser(
13736        _version: MavlinkVersion,
13737        __input: &[u8],
13738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13739        let avail_len = __input.len();
13740        let mut payload_buf = [0; Self::ENCODED_LEN];
13741        let mut buf = if avail_len < Self::ENCODED_LEN {
13742            payload_buf[0..avail_len].copy_from_slice(__input);
13743            Bytes::new(&payload_buf)
13744        } else {
13745            Bytes::new(__input)
13746        };
13747        let mut __struct = Self::default();
13748        __struct.lat = buf.get_i32_le();
13749        __struct.lon = buf.get_i32_le();
13750        __struct.terrain_height = buf.get_f32_le();
13751        __struct.current_height = buf.get_f32_le();
13752        __struct.spacing = buf.get_u16_le();
13753        __struct.pending = buf.get_u16_le();
13754        __struct.loaded = buf.get_u16_le();
13755        Ok(__struct)
13756    }
13757    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13758        let mut __tmp = BytesMut::new(bytes);
13759        #[allow(clippy::absurd_extreme_comparisons)]
13760        #[allow(unused_comparisons)]
13761        if __tmp.remaining() < Self::ENCODED_LEN {
13762            panic!(
13763                "buffer is too small (need {} bytes, but got {})",
13764                Self::ENCODED_LEN,
13765                __tmp.remaining(),
13766            )
13767        }
13768        __tmp.put_i32_le(self.lat);
13769        __tmp.put_i32_le(self.lon);
13770        __tmp.put_f32_le(self.terrain_height);
13771        __tmp.put_f32_le(self.current_height);
13772        __tmp.put_u16_le(self.spacing);
13773        __tmp.put_u16_le(self.pending);
13774        __tmp.put_u16_le(self.loaded);
13775        if matches!(version, MavlinkVersion::V2) {
13776            let len = __tmp.len();
13777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13778        } else {
13779            __tmp.len()
13780        }
13781    }
13782}
13783#[doc = "id: 44"]
13784#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
13785#[derive(Debug, Clone, PartialEq)]
13786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13788pub struct MISSION_COUNT_DATA {
13789    #[doc = "Number of mission items in the sequence"]
13790    pub count: u16,
13791    #[doc = "System ID"]
13792    pub target_system: u8,
13793    #[doc = "Component ID"]
13794    pub target_component: u8,
13795    #[doc = "Mission type."]
13796    #[cfg_attr(feature = "serde", serde(default))]
13797    pub mission_type: MavMissionType,
13798    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
13799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13800    pub opaque_id: u32,
13801}
13802impl MISSION_COUNT_DATA {
13803    pub const ENCODED_LEN: usize = 9usize;
13804    pub const DEFAULT: Self = Self {
13805        count: 0_u16,
13806        target_system: 0_u8,
13807        target_component: 0_u8,
13808        mission_type: MavMissionType::DEFAULT,
13809        opaque_id: 0_u32,
13810    };
13811    #[cfg(feature = "arbitrary")]
13812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13813        use arbitrary::{Arbitrary, Unstructured};
13814        let mut buf = [0u8; 1024];
13815        rng.fill_bytes(&mut buf);
13816        let mut unstructured = Unstructured::new(&buf);
13817        Self::arbitrary(&mut unstructured).unwrap_or_default()
13818    }
13819}
13820impl Default for MISSION_COUNT_DATA {
13821    fn default() -> Self {
13822        Self::DEFAULT.clone()
13823    }
13824}
13825impl MessageData for MISSION_COUNT_DATA {
13826    type Message = MavMessage;
13827    const ID: u32 = 44u32;
13828    const NAME: &'static str = "MISSION_COUNT";
13829    const EXTRA_CRC: u8 = 221u8;
13830    const ENCODED_LEN: usize = 9usize;
13831    fn deser(
13832        _version: MavlinkVersion,
13833        __input: &[u8],
13834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13835        let avail_len = __input.len();
13836        let mut payload_buf = [0; Self::ENCODED_LEN];
13837        let mut buf = if avail_len < Self::ENCODED_LEN {
13838            payload_buf[0..avail_len].copy_from_slice(__input);
13839            Bytes::new(&payload_buf)
13840        } else {
13841            Bytes::new(__input)
13842        };
13843        let mut __struct = Self::default();
13844        __struct.count = buf.get_u16_le();
13845        __struct.target_system = buf.get_u8();
13846        __struct.target_component = buf.get_u8();
13847        let tmp = buf.get_u8();
13848        __struct.mission_type =
13849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13850                enum_type: "MavMissionType",
13851                value: tmp as u32,
13852            })?;
13853        __struct.opaque_id = buf.get_u32_le();
13854        Ok(__struct)
13855    }
13856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13857        let mut __tmp = BytesMut::new(bytes);
13858        #[allow(clippy::absurd_extreme_comparisons)]
13859        #[allow(unused_comparisons)]
13860        if __tmp.remaining() < Self::ENCODED_LEN {
13861            panic!(
13862                "buffer is too small (need {} bytes, but got {})",
13863                Self::ENCODED_LEN,
13864                __tmp.remaining(),
13865            )
13866        }
13867        __tmp.put_u16_le(self.count);
13868        __tmp.put_u8(self.target_system);
13869        __tmp.put_u8(self.target_component);
13870        __tmp.put_u8(self.mission_type as u8);
13871        __tmp.put_u32_le(self.opaque_id);
13872        if matches!(version, MavlinkVersion::V2) {
13873            let len = __tmp.len();
13874            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13875        } else {
13876            __tmp.len()
13877        }
13878    }
13879}
13880#[doc = "id: 287"]
13881#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13882#[derive(Debug, Clone, PartialEq)]
13883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13885pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13886    #[doc = "High level gimbal manager flags to use."]
13887    pub flags: GimbalManagerFlags,
13888    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13889    pub pitch: f32,
13890    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13891    pub yaw: f32,
13892    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13893    pub pitch_rate: f32,
13894    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13895    pub yaw_rate: f32,
13896    #[doc = "System ID"]
13897    pub target_system: u8,
13898    #[doc = "Component ID"]
13899    pub target_component: u8,
13900    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13901    pub gimbal_device_id: u8,
13902}
13903impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13904    pub const ENCODED_LEN: usize = 23usize;
13905    pub const DEFAULT: Self = Self {
13906        flags: GimbalManagerFlags::DEFAULT,
13907        pitch: 0.0_f32,
13908        yaw: 0.0_f32,
13909        pitch_rate: 0.0_f32,
13910        yaw_rate: 0.0_f32,
13911        target_system: 0_u8,
13912        target_component: 0_u8,
13913        gimbal_device_id: 0_u8,
13914    };
13915    #[cfg(feature = "arbitrary")]
13916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13917        use arbitrary::{Arbitrary, Unstructured};
13918        let mut buf = [0u8; 1024];
13919        rng.fill_bytes(&mut buf);
13920        let mut unstructured = Unstructured::new(&buf);
13921        Self::arbitrary(&mut unstructured).unwrap_or_default()
13922    }
13923}
13924impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13925    fn default() -> Self {
13926        Self::DEFAULT.clone()
13927    }
13928}
13929impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13930    type Message = MavMessage;
13931    const ID: u32 = 287u32;
13932    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13933    const EXTRA_CRC: u8 = 1u8;
13934    const ENCODED_LEN: usize = 23usize;
13935    fn deser(
13936        _version: MavlinkVersion,
13937        __input: &[u8],
13938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13939        let avail_len = __input.len();
13940        let mut payload_buf = [0; Self::ENCODED_LEN];
13941        let mut buf = if avail_len < Self::ENCODED_LEN {
13942            payload_buf[0..avail_len].copy_from_slice(__input);
13943            Bytes::new(&payload_buf)
13944        } else {
13945            Bytes::new(__input)
13946        };
13947        let mut __struct = Self::default();
13948        let tmp = buf.get_u32_le();
13949        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13950            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13951                flag_type: "GimbalManagerFlags",
13952                value: tmp as u32,
13953            })?;
13954        __struct.pitch = buf.get_f32_le();
13955        __struct.yaw = buf.get_f32_le();
13956        __struct.pitch_rate = buf.get_f32_le();
13957        __struct.yaw_rate = buf.get_f32_le();
13958        __struct.target_system = buf.get_u8();
13959        __struct.target_component = buf.get_u8();
13960        __struct.gimbal_device_id = buf.get_u8();
13961        Ok(__struct)
13962    }
13963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13964        let mut __tmp = BytesMut::new(bytes);
13965        #[allow(clippy::absurd_extreme_comparisons)]
13966        #[allow(unused_comparisons)]
13967        if __tmp.remaining() < Self::ENCODED_LEN {
13968            panic!(
13969                "buffer is too small (need {} bytes, but got {})",
13970                Self::ENCODED_LEN,
13971                __tmp.remaining(),
13972            )
13973        }
13974        __tmp.put_u32_le(self.flags.bits());
13975        __tmp.put_f32_le(self.pitch);
13976        __tmp.put_f32_le(self.yaw);
13977        __tmp.put_f32_le(self.pitch_rate);
13978        __tmp.put_f32_le(self.yaw_rate);
13979        __tmp.put_u8(self.target_system);
13980        __tmp.put_u8(self.target_component);
13981        __tmp.put_u8(self.gimbal_device_id);
13982        if matches!(version, MavlinkVersion::V2) {
13983            let len = __tmp.len();
13984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13985        } else {
13986            __tmp.len()
13987        }
13988    }
13989}
13990#[doc = "id: 29"]
13991#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
13992#[derive(Debug, Clone, PartialEq)]
13993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13995pub struct SCALED_PRESSURE_DATA {
13996    #[doc = "Timestamp (time since system boot)."]
13997    pub time_boot_ms: u32,
13998    #[doc = "Absolute pressure"]
13999    pub press_abs: f32,
14000    #[doc = "Differential pressure 1"]
14001    pub press_diff: f32,
14002    #[doc = "Absolute pressure temperature"]
14003    pub temperature: i16,
14004    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
14005    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14006    pub temperature_press_diff: i16,
14007}
14008impl SCALED_PRESSURE_DATA {
14009    pub const ENCODED_LEN: usize = 16usize;
14010    pub const DEFAULT: Self = Self {
14011        time_boot_ms: 0_u32,
14012        press_abs: 0.0_f32,
14013        press_diff: 0.0_f32,
14014        temperature: 0_i16,
14015        temperature_press_diff: 0_i16,
14016    };
14017    #[cfg(feature = "arbitrary")]
14018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14019        use arbitrary::{Arbitrary, Unstructured};
14020        let mut buf = [0u8; 1024];
14021        rng.fill_bytes(&mut buf);
14022        let mut unstructured = Unstructured::new(&buf);
14023        Self::arbitrary(&mut unstructured).unwrap_or_default()
14024    }
14025}
14026impl Default for SCALED_PRESSURE_DATA {
14027    fn default() -> Self {
14028        Self::DEFAULT.clone()
14029    }
14030}
14031impl MessageData for SCALED_PRESSURE_DATA {
14032    type Message = MavMessage;
14033    const ID: u32 = 29u32;
14034    const NAME: &'static str = "SCALED_PRESSURE";
14035    const EXTRA_CRC: u8 = 115u8;
14036    const ENCODED_LEN: usize = 16usize;
14037    fn deser(
14038        _version: MavlinkVersion,
14039        __input: &[u8],
14040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14041        let avail_len = __input.len();
14042        let mut payload_buf = [0; Self::ENCODED_LEN];
14043        let mut buf = if avail_len < Self::ENCODED_LEN {
14044            payload_buf[0..avail_len].copy_from_slice(__input);
14045            Bytes::new(&payload_buf)
14046        } else {
14047            Bytes::new(__input)
14048        };
14049        let mut __struct = Self::default();
14050        __struct.time_boot_ms = buf.get_u32_le();
14051        __struct.press_abs = buf.get_f32_le();
14052        __struct.press_diff = buf.get_f32_le();
14053        __struct.temperature = buf.get_i16_le();
14054        __struct.temperature_press_diff = buf.get_i16_le();
14055        Ok(__struct)
14056    }
14057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14058        let mut __tmp = BytesMut::new(bytes);
14059        #[allow(clippy::absurd_extreme_comparisons)]
14060        #[allow(unused_comparisons)]
14061        if __tmp.remaining() < Self::ENCODED_LEN {
14062            panic!(
14063                "buffer is too small (need {} bytes, but got {})",
14064                Self::ENCODED_LEN,
14065                __tmp.remaining(),
14066            )
14067        }
14068        __tmp.put_u32_le(self.time_boot_ms);
14069        __tmp.put_f32_le(self.press_abs);
14070        __tmp.put_f32_le(self.press_diff);
14071        __tmp.put_i16_le(self.temperature);
14072        __tmp.put_i16_le(self.temperature_press_diff);
14073        if matches!(version, MavlinkVersion::V2) {
14074            let len = __tmp.len();
14075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14076        } else {
14077            __tmp.len()
14078        }
14079    }
14080}
14081#[doc = "id: 47"]
14082#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
14083#[derive(Debug, Clone, PartialEq)]
14084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14086pub struct MISSION_ACK_DATA {
14087    #[doc = "System ID"]
14088    pub target_system: u8,
14089    #[doc = "Component ID"]
14090    pub target_component: u8,
14091    #[doc = "Mission result."]
14092    pub mavtype: MavMissionResult,
14093    #[doc = "Mission type."]
14094    #[cfg_attr(feature = "serde", serde(default))]
14095    pub mission_type: MavMissionType,
14096    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
14097    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14098    pub opaque_id: u32,
14099}
14100impl MISSION_ACK_DATA {
14101    pub const ENCODED_LEN: usize = 8usize;
14102    pub const DEFAULT: Self = Self {
14103        target_system: 0_u8,
14104        target_component: 0_u8,
14105        mavtype: MavMissionResult::DEFAULT,
14106        mission_type: MavMissionType::DEFAULT,
14107        opaque_id: 0_u32,
14108    };
14109    #[cfg(feature = "arbitrary")]
14110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14111        use arbitrary::{Arbitrary, Unstructured};
14112        let mut buf = [0u8; 1024];
14113        rng.fill_bytes(&mut buf);
14114        let mut unstructured = Unstructured::new(&buf);
14115        Self::arbitrary(&mut unstructured).unwrap_or_default()
14116    }
14117}
14118impl Default for MISSION_ACK_DATA {
14119    fn default() -> Self {
14120        Self::DEFAULT.clone()
14121    }
14122}
14123impl MessageData for MISSION_ACK_DATA {
14124    type Message = MavMessage;
14125    const ID: u32 = 47u32;
14126    const NAME: &'static str = "MISSION_ACK";
14127    const EXTRA_CRC: u8 = 153u8;
14128    const ENCODED_LEN: usize = 8usize;
14129    fn deser(
14130        _version: MavlinkVersion,
14131        __input: &[u8],
14132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14133        let avail_len = __input.len();
14134        let mut payload_buf = [0; Self::ENCODED_LEN];
14135        let mut buf = if avail_len < Self::ENCODED_LEN {
14136            payload_buf[0..avail_len].copy_from_slice(__input);
14137            Bytes::new(&payload_buf)
14138        } else {
14139            Bytes::new(__input)
14140        };
14141        let mut __struct = Self::default();
14142        __struct.target_system = buf.get_u8();
14143        __struct.target_component = buf.get_u8();
14144        let tmp = buf.get_u8();
14145        __struct.mavtype =
14146            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14147                enum_type: "MavMissionResult",
14148                value: tmp as u32,
14149            })?;
14150        let tmp = buf.get_u8();
14151        __struct.mission_type =
14152            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14153                enum_type: "MavMissionType",
14154                value: tmp as u32,
14155            })?;
14156        __struct.opaque_id = buf.get_u32_le();
14157        Ok(__struct)
14158    }
14159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14160        let mut __tmp = BytesMut::new(bytes);
14161        #[allow(clippy::absurd_extreme_comparisons)]
14162        #[allow(unused_comparisons)]
14163        if __tmp.remaining() < Self::ENCODED_LEN {
14164            panic!(
14165                "buffer is too small (need {} bytes, but got {})",
14166                Self::ENCODED_LEN,
14167                __tmp.remaining(),
14168            )
14169        }
14170        __tmp.put_u8(self.target_system);
14171        __tmp.put_u8(self.target_component);
14172        __tmp.put_u8(self.mavtype as u8);
14173        __tmp.put_u8(self.mission_type as u8);
14174        __tmp.put_u32_le(self.opaque_id);
14175        if matches!(version, MavlinkVersion::V2) {
14176            let len = __tmp.len();
14177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14178        } else {
14179            __tmp.len()
14180        }
14181    }
14182}
14183#[doc = "id: 37"]
14184#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
14185#[derive(Debug, Clone, PartialEq)]
14186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14188pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
14189    #[doc = "Start index"]
14190    pub start_index: i16,
14191    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
14192    pub end_index: i16,
14193    #[doc = "System ID"]
14194    pub target_system: u8,
14195    #[doc = "Component ID"]
14196    pub target_component: u8,
14197    #[doc = "Mission type."]
14198    #[cfg_attr(feature = "serde", serde(default))]
14199    pub mission_type: MavMissionType,
14200}
14201impl MISSION_REQUEST_PARTIAL_LIST_DATA {
14202    pub const ENCODED_LEN: usize = 7usize;
14203    pub const DEFAULT: Self = Self {
14204        start_index: 0_i16,
14205        end_index: 0_i16,
14206        target_system: 0_u8,
14207        target_component: 0_u8,
14208        mission_type: MavMissionType::DEFAULT,
14209    };
14210    #[cfg(feature = "arbitrary")]
14211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14212        use arbitrary::{Arbitrary, Unstructured};
14213        let mut buf = [0u8; 1024];
14214        rng.fill_bytes(&mut buf);
14215        let mut unstructured = Unstructured::new(&buf);
14216        Self::arbitrary(&mut unstructured).unwrap_or_default()
14217    }
14218}
14219impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
14220    fn default() -> Self {
14221        Self::DEFAULT.clone()
14222    }
14223}
14224impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
14225    type Message = MavMessage;
14226    const ID: u32 = 37u32;
14227    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
14228    const EXTRA_CRC: u8 = 212u8;
14229    const ENCODED_LEN: usize = 7usize;
14230    fn deser(
14231        _version: MavlinkVersion,
14232        __input: &[u8],
14233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14234        let avail_len = __input.len();
14235        let mut payload_buf = [0; Self::ENCODED_LEN];
14236        let mut buf = if avail_len < Self::ENCODED_LEN {
14237            payload_buf[0..avail_len].copy_from_slice(__input);
14238            Bytes::new(&payload_buf)
14239        } else {
14240            Bytes::new(__input)
14241        };
14242        let mut __struct = Self::default();
14243        __struct.start_index = buf.get_i16_le();
14244        __struct.end_index = buf.get_i16_le();
14245        __struct.target_system = buf.get_u8();
14246        __struct.target_component = buf.get_u8();
14247        let tmp = buf.get_u8();
14248        __struct.mission_type =
14249            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14250                enum_type: "MavMissionType",
14251                value: tmp as u32,
14252            })?;
14253        Ok(__struct)
14254    }
14255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14256        let mut __tmp = BytesMut::new(bytes);
14257        #[allow(clippy::absurd_extreme_comparisons)]
14258        #[allow(unused_comparisons)]
14259        if __tmp.remaining() < Self::ENCODED_LEN {
14260            panic!(
14261                "buffer is too small (need {} bytes, but got {})",
14262                Self::ENCODED_LEN,
14263                __tmp.remaining(),
14264            )
14265        }
14266        __tmp.put_i16_le(self.start_index);
14267        __tmp.put_i16_le(self.end_index);
14268        __tmp.put_u8(self.target_system);
14269        __tmp.put_u8(self.target_component);
14270        __tmp.put_u8(self.mission_type as u8);
14271        if matches!(version, MavlinkVersion::V2) {
14272            let len = __tmp.len();
14273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14274        } else {
14275            __tmp.len()
14276        }
14277    }
14278}
14279#[doc = "id: 12901"]
14280#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
14281#[derive(Debug, Clone, PartialEq)]
14282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14284pub struct OPEN_DRONE_ID_LOCATION_DATA {
14285    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
14286    pub latitude: i32,
14287    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
14288    pub longitude: i32,
14289    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
14290    pub altitude_barometric: f32,
14291    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
14292    pub altitude_geodetic: f32,
14293    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
14294    pub height: f32,
14295    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
14296    pub timestamp: f32,
14297    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
14298    pub direction: u16,
14299    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
14300    pub speed_horizontal: u16,
14301    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
14302    pub speed_vertical: i16,
14303    #[doc = "System ID (0 for broadcast)."]
14304    pub target_system: u8,
14305    #[doc = "Component ID (0 for broadcast)."]
14306    pub target_component: u8,
14307    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
14308    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14309    pub id_or_mac: [u8; 20],
14310    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
14311    pub status: MavOdidStatus,
14312    #[doc = "Indicates the reference point for the height field."]
14313    pub height_reference: MavOdidHeightRef,
14314    #[doc = "The accuracy of the horizontal position."]
14315    pub horizontal_accuracy: MavOdidHorAcc,
14316    #[doc = "The accuracy of the vertical position."]
14317    pub vertical_accuracy: MavOdidVerAcc,
14318    #[doc = "The accuracy of the barometric altitude."]
14319    pub barometer_accuracy: MavOdidVerAcc,
14320    #[doc = "The accuracy of the horizontal and vertical speed."]
14321    pub speed_accuracy: MavOdidSpeedAcc,
14322    #[doc = "The accuracy of the timestamps."]
14323    pub timestamp_accuracy: MavOdidTimeAcc,
14324}
14325impl OPEN_DRONE_ID_LOCATION_DATA {
14326    pub const ENCODED_LEN: usize = 59usize;
14327    pub const DEFAULT: Self = Self {
14328        latitude: 0_i32,
14329        longitude: 0_i32,
14330        altitude_barometric: 0.0_f32,
14331        altitude_geodetic: 0.0_f32,
14332        height: 0.0_f32,
14333        timestamp: 0.0_f32,
14334        direction: 0_u16,
14335        speed_horizontal: 0_u16,
14336        speed_vertical: 0_i16,
14337        target_system: 0_u8,
14338        target_component: 0_u8,
14339        id_or_mac: [0_u8; 20usize],
14340        status: MavOdidStatus::DEFAULT,
14341        height_reference: MavOdidHeightRef::DEFAULT,
14342        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
14343        vertical_accuracy: MavOdidVerAcc::DEFAULT,
14344        barometer_accuracy: MavOdidVerAcc::DEFAULT,
14345        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
14346        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
14347    };
14348    #[cfg(feature = "arbitrary")]
14349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14350        use arbitrary::{Arbitrary, Unstructured};
14351        let mut buf = [0u8; 1024];
14352        rng.fill_bytes(&mut buf);
14353        let mut unstructured = Unstructured::new(&buf);
14354        Self::arbitrary(&mut unstructured).unwrap_or_default()
14355    }
14356}
14357impl Default for OPEN_DRONE_ID_LOCATION_DATA {
14358    fn default() -> Self {
14359        Self::DEFAULT.clone()
14360    }
14361}
14362impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
14363    type Message = MavMessage;
14364    const ID: u32 = 12901u32;
14365    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
14366    const EXTRA_CRC: u8 = 254u8;
14367    const ENCODED_LEN: usize = 59usize;
14368    fn deser(
14369        _version: MavlinkVersion,
14370        __input: &[u8],
14371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14372        let avail_len = __input.len();
14373        let mut payload_buf = [0; Self::ENCODED_LEN];
14374        let mut buf = if avail_len < Self::ENCODED_LEN {
14375            payload_buf[0..avail_len].copy_from_slice(__input);
14376            Bytes::new(&payload_buf)
14377        } else {
14378            Bytes::new(__input)
14379        };
14380        let mut __struct = Self::default();
14381        __struct.latitude = buf.get_i32_le();
14382        __struct.longitude = buf.get_i32_le();
14383        __struct.altitude_barometric = buf.get_f32_le();
14384        __struct.altitude_geodetic = buf.get_f32_le();
14385        __struct.height = buf.get_f32_le();
14386        __struct.timestamp = buf.get_f32_le();
14387        __struct.direction = buf.get_u16_le();
14388        __struct.speed_horizontal = buf.get_u16_le();
14389        __struct.speed_vertical = buf.get_i16_le();
14390        __struct.target_system = buf.get_u8();
14391        __struct.target_component = buf.get_u8();
14392        for v in &mut __struct.id_or_mac {
14393            let val = buf.get_u8();
14394            *v = val;
14395        }
14396        let tmp = buf.get_u8();
14397        __struct.status =
14398            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14399                enum_type: "MavOdidStatus",
14400                value: tmp as u32,
14401            })?;
14402        let tmp = buf.get_u8();
14403        __struct.height_reference =
14404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14405                enum_type: "MavOdidHeightRef",
14406                value: tmp as u32,
14407            })?;
14408        let tmp = buf.get_u8();
14409        __struct.horizontal_accuracy =
14410            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14411                enum_type: "MavOdidHorAcc",
14412                value: tmp as u32,
14413            })?;
14414        let tmp = buf.get_u8();
14415        __struct.vertical_accuracy =
14416            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14417                enum_type: "MavOdidVerAcc",
14418                value: tmp as u32,
14419            })?;
14420        let tmp = buf.get_u8();
14421        __struct.barometer_accuracy =
14422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14423                enum_type: "MavOdidVerAcc",
14424                value: tmp as u32,
14425            })?;
14426        let tmp = buf.get_u8();
14427        __struct.speed_accuracy =
14428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14429                enum_type: "MavOdidSpeedAcc",
14430                value: tmp as u32,
14431            })?;
14432        let tmp = buf.get_u8();
14433        __struct.timestamp_accuracy =
14434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14435                enum_type: "MavOdidTimeAcc",
14436                value: tmp as u32,
14437            })?;
14438        Ok(__struct)
14439    }
14440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14441        let mut __tmp = BytesMut::new(bytes);
14442        #[allow(clippy::absurd_extreme_comparisons)]
14443        #[allow(unused_comparisons)]
14444        if __tmp.remaining() < Self::ENCODED_LEN {
14445            panic!(
14446                "buffer is too small (need {} bytes, but got {})",
14447                Self::ENCODED_LEN,
14448                __tmp.remaining(),
14449            )
14450        }
14451        __tmp.put_i32_le(self.latitude);
14452        __tmp.put_i32_le(self.longitude);
14453        __tmp.put_f32_le(self.altitude_barometric);
14454        __tmp.put_f32_le(self.altitude_geodetic);
14455        __tmp.put_f32_le(self.height);
14456        __tmp.put_f32_le(self.timestamp);
14457        __tmp.put_u16_le(self.direction);
14458        __tmp.put_u16_le(self.speed_horizontal);
14459        __tmp.put_i16_le(self.speed_vertical);
14460        __tmp.put_u8(self.target_system);
14461        __tmp.put_u8(self.target_component);
14462        for val in &self.id_or_mac {
14463            __tmp.put_u8(*val);
14464        }
14465        __tmp.put_u8(self.status as u8);
14466        __tmp.put_u8(self.height_reference as u8);
14467        __tmp.put_u8(self.horizontal_accuracy as u8);
14468        __tmp.put_u8(self.vertical_accuracy as u8);
14469        __tmp.put_u8(self.barometer_accuracy as u8);
14470        __tmp.put_u8(self.speed_accuracy as u8);
14471        __tmp.put_u8(self.timestamp_accuracy as u8);
14472        if matches!(version, MavlinkVersion::V2) {
14473            let len = __tmp.len();
14474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14475        } else {
14476            __tmp.len()
14477        }
14478    }
14479}
14480#[doc = "id: 350"]
14481#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
14482#[derive(Debug, Clone, PartialEq)]
14483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14485pub struct DEBUG_FLOAT_ARRAY_DATA {
14486    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14487    pub time_usec: u64,
14488    #[doc = "Unique ID used to discriminate between arrays"]
14489    pub array_id: u16,
14490    #[doc = "Name, for human-friendly display in a Ground Control Station"]
14491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14492    pub name: [u8; 10],
14493    #[doc = "data"]
14494    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14496    pub data: [f32; 58],
14497}
14498impl DEBUG_FLOAT_ARRAY_DATA {
14499    pub const ENCODED_LEN: usize = 252usize;
14500    pub const DEFAULT: Self = Self {
14501        time_usec: 0_u64,
14502        array_id: 0_u16,
14503        name: [0_u8; 10usize],
14504        data: [0.0_f32; 58usize],
14505    };
14506    #[cfg(feature = "arbitrary")]
14507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14508        use arbitrary::{Arbitrary, Unstructured};
14509        let mut buf = [0u8; 1024];
14510        rng.fill_bytes(&mut buf);
14511        let mut unstructured = Unstructured::new(&buf);
14512        Self::arbitrary(&mut unstructured).unwrap_or_default()
14513    }
14514}
14515impl Default for DEBUG_FLOAT_ARRAY_DATA {
14516    fn default() -> Self {
14517        Self::DEFAULT.clone()
14518    }
14519}
14520impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
14521    type Message = MavMessage;
14522    const ID: u32 = 350u32;
14523    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
14524    const EXTRA_CRC: u8 = 232u8;
14525    const ENCODED_LEN: usize = 252usize;
14526    fn deser(
14527        _version: MavlinkVersion,
14528        __input: &[u8],
14529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14530        let avail_len = __input.len();
14531        let mut payload_buf = [0; Self::ENCODED_LEN];
14532        let mut buf = if avail_len < Self::ENCODED_LEN {
14533            payload_buf[0..avail_len].copy_from_slice(__input);
14534            Bytes::new(&payload_buf)
14535        } else {
14536            Bytes::new(__input)
14537        };
14538        let mut __struct = Self::default();
14539        __struct.time_usec = buf.get_u64_le();
14540        __struct.array_id = buf.get_u16_le();
14541        for v in &mut __struct.name {
14542            let val = buf.get_u8();
14543            *v = val;
14544        }
14545        for v in &mut __struct.data {
14546            let val = buf.get_f32_le();
14547            *v = val;
14548        }
14549        Ok(__struct)
14550    }
14551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14552        let mut __tmp = BytesMut::new(bytes);
14553        #[allow(clippy::absurd_extreme_comparisons)]
14554        #[allow(unused_comparisons)]
14555        if __tmp.remaining() < Self::ENCODED_LEN {
14556            panic!(
14557                "buffer is too small (need {} bytes, but got {})",
14558                Self::ENCODED_LEN,
14559                __tmp.remaining(),
14560            )
14561        }
14562        __tmp.put_u64_le(self.time_usec);
14563        __tmp.put_u16_le(self.array_id);
14564        for val in &self.name {
14565            __tmp.put_u8(*val);
14566        }
14567        for val in &self.data {
14568            __tmp.put_f32_le(*val);
14569        }
14570        if matches!(version, MavlinkVersion::V2) {
14571            let len = __tmp.len();
14572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14573        } else {
14574            __tmp.len()
14575        }
14576    }
14577}
14578#[doc = "id: 413"]
14579#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
14580#[derive(Debug, Clone, PartialEq)]
14581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14583pub struct RESPONSE_EVENT_ERROR_DATA {
14584    #[doc = "Sequence number."]
14585    pub sequence: u16,
14586    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
14587    pub sequence_oldest_available: u16,
14588    #[doc = "System ID"]
14589    pub target_system: u8,
14590    #[doc = "Component ID"]
14591    pub target_component: u8,
14592    #[doc = "Error reason."]
14593    pub reason: MavEventErrorReason,
14594}
14595impl RESPONSE_EVENT_ERROR_DATA {
14596    pub const ENCODED_LEN: usize = 7usize;
14597    pub const DEFAULT: Self = Self {
14598        sequence: 0_u16,
14599        sequence_oldest_available: 0_u16,
14600        target_system: 0_u8,
14601        target_component: 0_u8,
14602        reason: MavEventErrorReason::DEFAULT,
14603    };
14604    #[cfg(feature = "arbitrary")]
14605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14606        use arbitrary::{Arbitrary, Unstructured};
14607        let mut buf = [0u8; 1024];
14608        rng.fill_bytes(&mut buf);
14609        let mut unstructured = Unstructured::new(&buf);
14610        Self::arbitrary(&mut unstructured).unwrap_or_default()
14611    }
14612}
14613impl Default for RESPONSE_EVENT_ERROR_DATA {
14614    fn default() -> Self {
14615        Self::DEFAULT.clone()
14616    }
14617}
14618impl MessageData for RESPONSE_EVENT_ERROR_DATA {
14619    type Message = MavMessage;
14620    const ID: u32 = 413u32;
14621    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
14622    const EXTRA_CRC: u8 = 77u8;
14623    const ENCODED_LEN: usize = 7usize;
14624    fn deser(
14625        _version: MavlinkVersion,
14626        __input: &[u8],
14627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14628        let avail_len = __input.len();
14629        let mut payload_buf = [0; Self::ENCODED_LEN];
14630        let mut buf = if avail_len < Self::ENCODED_LEN {
14631            payload_buf[0..avail_len].copy_from_slice(__input);
14632            Bytes::new(&payload_buf)
14633        } else {
14634            Bytes::new(__input)
14635        };
14636        let mut __struct = Self::default();
14637        __struct.sequence = buf.get_u16_le();
14638        __struct.sequence_oldest_available = buf.get_u16_le();
14639        __struct.target_system = buf.get_u8();
14640        __struct.target_component = buf.get_u8();
14641        let tmp = buf.get_u8();
14642        __struct.reason =
14643            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14644                enum_type: "MavEventErrorReason",
14645                value: tmp as u32,
14646            })?;
14647        Ok(__struct)
14648    }
14649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14650        let mut __tmp = BytesMut::new(bytes);
14651        #[allow(clippy::absurd_extreme_comparisons)]
14652        #[allow(unused_comparisons)]
14653        if __tmp.remaining() < Self::ENCODED_LEN {
14654            panic!(
14655                "buffer is too small (need {} bytes, but got {})",
14656                Self::ENCODED_LEN,
14657                __tmp.remaining(),
14658            )
14659        }
14660        __tmp.put_u16_le(self.sequence);
14661        __tmp.put_u16_le(self.sequence_oldest_available);
14662        __tmp.put_u8(self.target_system);
14663        __tmp.put_u8(self.target_component);
14664        __tmp.put_u8(self.reason as u8);
14665        if matches!(version, MavlinkVersion::V2) {
14666            let len = __tmp.len();
14667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14668        } else {
14669            __tmp.len()
14670        }
14671    }
14672}
14673#[doc = "id: 336"]
14674#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
14675#[derive(Debug, Clone, PartialEq)]
14676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14678pub struct CELLULAR_CONFIG_DATA {
14679    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
14680    pub enable_lte: u8,
14681    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
14682    pub enable_pin: u8,
14683    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
14684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14685    pub pin: [u8; 16],
14686    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
14687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14688    pub new_pin: [u8; 16],
14689    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
14690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14691    pub apn: [u8; 32],
14692    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
14693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14694    pub puk: [u8; 16],
14695    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
14696    pub roaming: u8,
14697    #[doc = "Message acceptance response (sent back to GS)."]
14698    pub response: CellularConfigResponse,
14699}
14700impl CELLULAR_CONFIG_DATA {
14701    pub const ENCODED_LEN: usize = 84usize;
14702    pub const DEFAULT: Self = Self {
14703        enable_lte: 0_u8,
14704        enable_pin: 0_u8,
14705        pin: [0_u8; 16usize],
14706        new_pin: [0_u8; 16usize],
14707        apn: [0_u8; 32usize],
14708        puk: [0_u8; 16usize],
14709        roaming: 0_u8,
14710        response: CellularConfigResponse::DEFAULT,
14711    };
14712    #[cfg(feature = "arbitrary")]
14713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14714        use arbitrary::{Arbitrary, Unstructured};
14715        let mut buf = [0u8; 1024];
14716        rng.fill_bytes(&mut buf);
14717        let mut unstructured = Unstructured::new(&buf);
14718        Self::arbitrary(&mut unstructured).unwrap_or_default()
14719    }
14720}
14721impl Default for CELLULAR_CONFIG_DATA {
14722    fn default() -> Self {
14723        Self::DEFAULT.clone()
14724    }
14725}
14726impl MessageData for CELLULAR_CONFIG_DATA {
14727    type Message = MavMessage;
14728    const ID: u32 = 336u32;
14729    const NAME: &'static str = "CELLULAR_CONFIG";
14730    const EXTRA_CRC: u8 = 245u8;
14731    const ENCODED_LEN: usize = 84usize;
14732    fn deser(
14733        _version: MavlinkVersion,
14734        __input: &[u8],
14735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14736        let avail_len = __input.len();
14737        let mut payload_buf = [0; Self::ENCODED_LEN];
14738        let mut buf = if avail_len < Self::ENCODED_LEN {
14739            payload_buf[0..avail_len].copy_from_slice(__input);
14740            Bytes::new(&payload_buf)
14741        } else {
14742            Bytes::new(__input)
14743        };
14744        let mut __struct = Self::default();
14745        __struct.enable_lte = buf.get_u8();
14746        __struct.enable_pin = buf.get_u8();
14747        for v in &mut __struct.pin {
14748            let val = buf.get_u8();
14749            *v = val;
14750        }
14751        for v in &mut __struct.new_pin {
14752            let val = buf.get_u8();
14753            *v = val;
14754        }
14755        for v in &mut __struct.apn {
14756            let val = buf.get_u8();
14757            *v = val;
14758        }
14759        for v in &mut __struct.puk {
14760            let val = buf.get_u8();
14761            *v = val;
14762        }
14763        __struct.roaming = buf.get_u8();
14764        let tmp = buf.get_u8();
14765        __struct.response =
14766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14767                enum_type: "CellularConfigResponse",
14768                value: tmp as u32,
14769            })?;
14770        Ok(__struct)
14771    }
14772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14773        let mut __tmp = BytesMut::new(bytes);
14774        #[allow(clippy::absurd_extreme_comparisons)]
14775        #[allow(unused_comparisons)]
14776        if __tmp.remaining() < Self::ENCODED_LEN {
14777            panic!(
14778                "buffer is too small (need {} bytes, but got {})",
14779                Self::ENCODED_LEN,
14780                __tmp.remaining(),
14781            )
14782        }
14783        __tmp.put_u8(self.enable_lte);
14784        __tmp.put_u8(self.enable_pin);
14785        for val in &self.pin {
14786            __tmp.put_u8(*val);
14787        }
14788        for val in &self.new_pin {
14789            __tmp.put_u8(*val);
14790        }
14791        for val in &self.apn {
14792            __tmp.put_u8(*val);
14793        }
14794        for val in &self.puk {
14795            __tmp.put_u8(*val);
14796        }
14797        __tmp.put_u8(self.roaming);
14798        __tmp.put_u8(self.response as u8);
14799        if matches!(version, MavlinkVersion::V2) {
14800            let len = __tmp.len();
14801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14802        } else {
14803            __tmp.len()
14804        }
14805    }
14806}
14807#[doc = "id: 49"]
14808#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14809#[derive(Debug, Clone, PartialEq)]
14810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14812pub struct GPS_GLOBAL_ORIGIN_DATA {
14813    #[doc = "Latitude (WGS84)"]
14814    pub latitude: i32,
14815    #[doc = "Longitude (WGS84)"]
14816    pub longitude: i32,
14817    #[doc = "Altitude (MSL). Positive for up."]
14818    pub altitude: i32,
14819    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14821    pub time_usec: u64,
14822}
14823impl GPS_GLOBAL_ORIGIN_DATA {
14824    pub const ENCODED_LEN: usize = 20usize;
14825    pub const DEFAULT: Self = Self {
14826        latitude: 0_i32,
14827        longitude: 0_i32,
14828        altitude: 0_i32,
14829        time_usec: 0_u64,
14830    };
14831    #[cfg(feature = "arbitrary")]
14832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14833        use arbitrary::{Arbitrary, Unstructured};
14834        let mut buf = [0u8; 1024];
14835        rng.fill_bytes(&mut buf);
14836        let mut unstructured = Unstructured::new(&buf);
14837        Self::arbitrary(&mut unstructured).unwrap_or_default()
14838    }
14839}
14840impl Default for GPS_GLOBAL_ORIGIN_DATA {
14841    fn default() -> Self {
14842        Self::DEFAULT.clone()
14843    }
14844}
14845impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14846    type Message = MavMessage;
14847    const ID: u32 = 49u32;
14848    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14849    const EXTRA_CRC: u8 = 39u8;
14850    const ENCODED_LEN: usize = 20usize;
14851    fn deser(
14852        _version: MavlinkVersion,
14853        __input: &[u8],
14854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14855        let avail_len = __input.len();
14856        let mut payload_buf = [0; Self::ENCODED_LEN];
14857        let mut buf = if avail_len < Self::ENCODED_LEN {
14858            payload_buf[0..avail_len].copy_from_slice(__input);
14859            Bytes::new(&payload_buf)
14860        } else {
14861            Bytes::new(__input)
14862        };
14863        let mut __struct = Self::default();
14864        __struct.latitude = buf.get_i32_le();
14865        __struct.longitude = buf.get_i32_le();
14866        __struct.altitude = buf.get_i32_le();
14867        __struct.time_usec = buf.get_u64_le();
14868        Ok(__struct)
14869    }
14870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14871        let mut __tmp = BytesMut::new(bytes);
14872        #[allow(clippy::absurd_extreme_comparisons)]
14873        #[allow(unused_comparisons)]
14874        if __tmp.remaining() < Self::ENCODED_LEN {
14875            panic!(
14876                "buffer is too small (need {} bytes, but got {})",
14877                Self::ENCODED_LEN,
14878                __tmp.remaining(),
14879            )
14880        }
14881        __tmp.put_i32_le(self.latitude);
14882        __tmp.put_i32_le(self.longitude);
14883        __tmp.put_i32_le(self.altitude);
14884        __tmp.put_u64_le(self.time_usec);
14885        if matches!(version, MavlinkVersion::V2) {
14886            let len = __tmp.len();
14887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14888        } else {
14889            __tmp.len()
14890        }
14891    }
14892}
14893#[doc = "id: 225"]
14894#[doc = "EFI status output."]
14895#[derive(Debug, Clone, PartialEq)]
14896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14898pub struct EFI_STATUS_DATA {
14899    #[doc = "ECU index"]
14900    pub ecu_index: f32,
14901    #[doc = "RPM"]
14902    pub rpm: f32,
14903    #[doc = "Fuel consumed"]
14904    pub fuel_consumed: f32,
14905    #[doc = "Fuel flow rate"]
14906    pub fuel_flow: f32,
14907    #[doc = "Engine load"]
14908    pub engine_load: f32,
14909    #[doc = "Throttle position"]
14910    pub throttle_position: f32,
14911    #[doc = "Spark dwell time"]
14912    pub spark_dwell_time: f32,
14913    #[doc = "Barometric pressure"]
14914    pub barometric_pressure: f32,
14915    #[doc = "Intake manifold pressure("]
14916    pub intake_manifold_pressure: f32,
14917    #[doc = "Intake manifold temperature"]
14918    pub intake_manifold_temperature: f32,
14919    #[doc = "Cylinder head temperature"]
14920    pub cylinder_head_temperature: f32,
14921    #[doc = "Ignition timing (Crank angle degrees)"]
14922    pub ignition_timing: f32,
14923    #[doc = "Injection time"]
14924    pub injection_time: f32,
14925    #[doc = "Exhaust gas temperature"]
14926    pub exhaust_gas_temperature: f32,
14927    #[doc = "Output throttle"]
14928    pub throttle_out: f32,
14929    #[doc = "Pressure/temperature compensation"]
14930    pub pt_compensation: f32,
14931    #[doc = "EFI health status"]
14932    pub health: u8,
14933    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
14934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14935    pub ignition_voltage: f32,
14936    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
14937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14938    pub fuel_pressure: f32,
14939}
14940impl EFI_STATUS_DATA {
14941    pub const ENCODED_LEN: usize = 73usize;
14942    pub const DEFAULT: Self = Self {
14943        ecu_index: 0.0_f32,
14944        rpm: 0.0_f32,
14945        fuel_consumed: 0.0_f32,
14946        fuel_flow: 0.0_f32,
14947        engine_load: 0.0_f32,
14948        throttle_position: 0.0_f32,
14949        spark_dwell_time: 0.0_f32,
14950        barometric_pressure: 0.0_f32,
14951        intake_manifold_pressure: 0.0_f32,
14952        intake_manifold_temperature: 0.0_f32,
14953        cylinder_head_temperature: 0.0_f32,
14954        ignition_timing: 0.0_f32,
14955        injection_time: 0.0_f32,
14956        exhaust_gas_temperature: 0.0_f32,
14957        throttle_out: 0.0_f32,
14958        pt_compensation: 0.0_f32,
14959        health: 0_u8,
14960        ignition_voltage: 0.0_f32,
14961        fuel_pressure: 0.0_f32,
14962    };
14963    #[cfg(feature = "arbitrary")]
14964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14965        use arbitrary::{Arbitrary, Unstructured};
14966        let mut buf = [0u8; 1024];
14967        rng.fill_bytes(&mut buf);
14968        let mut unstructured = Unstructured::new(&buf);
14969        Self::arbitrary(&mut unstructured).unwrap_or_default()
14970    }
14971}
14972impl Default for EFI_STATUS_DATA {
14973    fn default() -> Self {
14974        Self::DEFAULT.clone()
14975    }
14976}
14977impl MessageData for EFI_STATUS_DATA {
14978    type Message = MavMessage;
14979    const ID: u32 = 225u32;
14980    const NAME: &'static str = "EFI_STATUS";
14981    const EXTRA_CRC: u8 = 208u8;
14982    const ENCODED_LEN: usize = 73usize;
14983    fn deser(
14984        _version: MavlinkVersion,
14985        __input: &[u8],
14986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14987        let avail_len = __input.len();
14988        let mut payload_buf = [0; Self::ENCODED_LEN];
14989        let mut buf = if avail_len < Self::ENCODED_LEN {
14990            payload_buf[0..avail_len].copy_from_slice(__input);
14991            Bytes::new(&payload_buf)
14992        } else {
14993            Bytes::new(__input)
14994        };
14995        let mut __struct = Self::default();
14996        __struct.ecu_index = buf.get_f32_le();
14997        __struct.rpm = buf.get_f32_le();
14998        __struct.fuel_consumed = buf.get_f32_le();
14999        __struct.fuel_flow = buf.get_f32_le();
15000        __struct.engine_load = buf.get_f32_le();
15001        __struct.throttle_position = buf.get_f32_le();
15002        __struct.spark_dwell_time = buf.get_f32_le();
15003        __struct.barometric_pressure = buf.get_f32_le();
15004        __struct.intake_manifold_pressure = buf.get_f32_le();
15005        __struct.intake_manifold_temperature = buf.get_f32_le();
15006        __struct.cylinder_head_temperature = buf.get_f32_le();
15007        __struct.ignition_timing = buf.get_f32_le();
15008        __struct.injection_time = buf.get_f32_le();
15009        __struct.exhaust_gas_temperature = buf.get_f32_le();
15010        __struct.throttle_out = buf.get_f32_le();
15011        __struct.pt_compensation = buf.get_f32_le();
15012        __struct.health = buf.get_u8();
15013        __struct.ignition_voltage = buf.get_f32_le();
15014        __struct.fuel_pressure = buf.get_f32_le();
15015        Ok(__struct)
15016    }
15017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15018        let mut __tmp = BytesMut::new(bytes);
15019        #[allow(clippy::absurd_extreme_comparisons)]
15020        #[allow(unused_comparisons)]
15021        if __tmp.remaining() < Self::ENCODED_LEN {
15022            panic!(
15023                "buffer is too small (need {} bytes, but got {})",
15024                Self::ENCODED_LEN,
15025                __tmp.remaining(),
15026            )
15027        }
15028        __tmp.put_f32_le(self.ecu_index);
15029        __tmp.put_f32_le(self.rpm);
15030        __tmp.put_f32_le(self.fuel_consumed);
15031        __tmp.put_f32_le(self.fuel_flow);
15032        __tmp.put_f32_le(self.engine_load);
15033        __tmp.put_f32_le(self.throttle_position);
15034        __tmp.put_f32_le(self.spark_dwell_time);
15035        __tmp.put_f32_le(self.barometric_pressure);
15036        __tmp.put_f32_le(self.intake_manifold_pressure);
15037        __tmp.put_f32_le(self.intake_manifold_temperature);
15038        __tmp.put_f32_le(self.cylinder_head_temperature);
15039        __tmp.put_f32_le(self.ignition_timing);
15040        __tmp.put_f32_le(self.injection_time);
15041        __tmp.put_f32_le(self.exhaust_gas_temperature);
15042        __tmp.put_f32_le(self.throttle_out);
15043        __tmp.put_f32_le(self.pt_compensation);
15044        __tmp.put_u8(self.health);
15045        __tmp.put_f32_le(self.ignition_voltage);
15046        __tmp.put_f32_le(self.fuel_pressure);
15047        if matches!(version, MavlinkVersion::V2) {
15048            let len = __tmp.len();
15049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15050        } else {
15051            __tmp.len()
15052        }
15053    }
15054}
15055#[doc = "id: 320"]
15056#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
15057#[derive(Debug, Clone, PartialEq)]
15058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15060pub struct PARAM_EXT_REQUEST_READ_DATA {
15061    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
15062    pub param_index: i16,
15063    #[doc = "System ID"]
15064    pub target_system: u8,
15065    #[doc = "Component ID"]
15066    pub target_component: u8,
15067    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
15068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15069    pub param_id: [u8; 16],
15070}
15071impl PARAM_EXT_REQUEST_READ_DATA {
15072    pub const ENCODED_LEN: usize = 20usize;
15073    pub const DEFAULT: Self = Self {
15074        param_index: 0_i16,
15075        target_system: 0_u8,
15076        target_component: 0_u8,
15077        param_id: [0_u8; 16usize],
15078    };
15079    #[cfg(feature = "arbitrary")]
15080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15081        use arbitrary::{Arbitrary, Unstructured};
15082        let mut buf = [0u8; 1024];
15083        rng.fill_bytes(&mut buf);
15084        let mut unstructured = Unstructured::new(&buf);
15085        Self::arbitrary(&mut unstructured).unwrap_or_default()
15086    }
15087}
15088impl Default for PARAM_EXT_REQUEST_READ_DATA {
15089    fn default() -> Self {
15090        Self::DEFAULT.clone()
15091    }
15092}
15093impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
15094    type Message = MavMessage;
15095    const ID: u32 = 320u32;
15096    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
15097    const EXTRA_CRC: u8 = 243u8;
15098    const ENCODED_LEN: usize = 20usize;
15099    fn deser(
15100        _version: MavlinkVersion,
15101        __input: &[u8],
15102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15103        let avail_len = __input.len();
15104        let mut payload_buf = [0; Self::ENCODED_LEN];
15105        let mut buf = if avail_len < Self::ENCODED_LEN {
15106            payload_buf[0..avail_len].copy_from_slice(__input);
15107            Bytes::new(&payload_buf)
15108        } else {
15109            Bytes::new(__input)
15110        };
15111        let mut __struct = Self::default();
15112        __struct.param_index = buf.get_i16_le();
15113        __struct.target_system = buf.get_u8();
15114        __struct.target_component = buf.get_u8();
15115        for v in &mut __struct.param_id {
15116            let val = buf.get_u8();
15117            *v = val;
15118        }
15119        Ok(__struct)
15120    }
15121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15122        let mut __tmp = BytesMut::new(bytes);
15123        #[allow(clippy::absurd_extreme_comparisons)]
15124        #[allow(unused_comparisons)]
15125        if __tmp.remaining() < Self::ENCODED_LEN {
15126            panic!(
15127                "buffer is too small (need {} bytes, but got {})",
15128                Self::ENCODED_LEN,
15129                __tmp.remaining(),
15130            )
15131        }
15132        __tmp.put_i16_le(self.param_index);
15133        __tmp.put_u8(self.target_system);
15134        __tmp.put_u8(self.target_component);
15135        for val in &self.param_id {
15136            __tmp.put_u8(*val);
15137        }
15138        if matches!(version, MavlinkVersion::V2) {
15139            let len = __tmp.len();
15140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15141        } else {
15142            __tmp.len()
15143        }
15144    }
15145}
15146#[doc = "id: 83"]
15147#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
15148#[derive(Debug, Clone, PartialEq)]
15149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15151pub struct ATTITUDE_TARGET_DATA {
15152    #[doc = "Timestamp (time since system boot)."]
15153    pub time_boot_ms: u32,
15154    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
15155    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15156    pub q: [f32; 4],
15157    #[doc = "Body roll rate"]
15158    pub body_roll_rate: f32,
15159    #[doc = "Body pitch rate"]
15160    pub body_pitch_rate: f32,
15161    #[doc = "Body yaw rate"]
15162    pub body_yaw_rate: f32,
15163    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
15164    pub thrust: f32,
15165    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
15166    pub type_mask: AttitudeTargetTypemask,
15167}
15168impl ATTITUDE_TARGET_DATA {
15169    pub const ENCODED_LEN: usize = 37usize;
15170    pub const DEFAULT: Self = Self {
15171        time_boot_ms: 0_u32,
15172        q: [0.0_f32; 4usize],
15173        body_roll_rate: 0.0_f32,
15174        body_pitch_rate: 0.0_f32,
15175        body_yaw_rate: 0.0_f32,
15176        thrust: 0.0_f32,
15177        type_mask: AttitudeTargetTypemask::DEFAULT,
15178    };
15179    #[cfg(feature = "arbitrary")]
15180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15181        use arbitrary::{Arbitrary, Unstructured};
15182        let mut buf = [0u8; 1024];
15183        rng.fill_bytes(&mut buf);
15184        let mut unstructured = Unstructured::new(&buf);
15185        Self::arbitrary(&mut unstructured).unwrap_or_default()
15186    }
15187}
15188impl Default for ATTITUDE_TARGET_DATA {
15189    fn default() -> Self {
15190        Self::DEFAULT.clone()
15191    }
15192}
15193impl MessageData for ATTITUDE_TARGET_DATA {
15194    type Message = MavMessage;
15195    const ID: u32 = 83u32;
15196    const NAME: &'static str = "ATTITUDE_TARGET";
15197    const EXTRA_CRC: u8 = 22u8;
15198    const ENCODED_LEN: usize = 37usize;
15199    fn deser(
15200        _version: MavlinkVersion,
15201        __input: &[u8],
15202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15203        let avail_len = __input.len();
15204        let mut payload_buf = [0; Self::ENCODED_LEN];
15205        let mut buf = if avail_len < Self::ENCODED_LEN {
15206            payload_buf[0..avail_len].copy_from_slice(__input);
15207            Bytes::new(&payload_buf)
15208        } else {
15209            Bytes::new(__input)
15210        };
15211        let mut __struct = Self::default();
15212        __struct.time_boot_ms = buf.get_u32_le();
15213        for v in &mut __struct.q {
15214            let val = buf.get_f32_le();
15215            *v = val;
15216        }
15217        __struct.body_roll_rate = buf.get_f32_le();
15218        __struct.body_pitch_rate = buf.get_f32_le();
15219        __struct.body_yaw_rate = buf.get_f32_le();
15220        __struct.thrust = buf.get_f32_le();
15221        let tmp = buf.get_u8();
15222        __struct.type_mask = AttitudeTargetTypemask::from_bits(
15223            tmp & AttitudeTargetTypemask::all().bits(),
15224        )
15225        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15226            flag_type: "AttitudeTargetTypemask",
15227            value: tmp as u32,
15228        })?;
15229        Ok(__struct)
15230    }
15231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15232        let mut __tmp = BytesMut::new(bytes);
15233        #[allow(clippy::absurd_extreme_comparisons)]
15234        #[allow(unused_comparisons)]
15235        if __tmp.remaining() < Self::ENCODED_LEN {
15236            panic!(
15237                "buffer is too small (need {} bytes, but got {})",
15238                Self::ENCODED_LEN,
15239                __tmp.remaining(),
15240            )
15241        }
15242        __tmp.put_u32_le(self.time_boot_ms);
15243        for val in &self.q {
15244            __tmp.put_f32_le(*val);
15245        }
15246        __tmp.put_f32_le(self.body_roll_rate);
15247        __tmp.put_f32_le(self.body_pitch_rate);
15248        __tmp.put_f32_le(self.body_yaw_rate);
15249        __tmp.put_f32_le(self.thrust);
15250        __tmp.put_u8(self.type_mask.bits());
15251        if matches!(version, MavlinkVersion::V2) {
15252            let len = __tmp.len();
15253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15254        } else {
15255            __tmp.len()
15256        }
15257    }
15258}
15259#[doc = "id: 245"]
15260#[doc = "Provides state for additional features."]
15261#[derive(Debug, Clone, PartialEq)]
15262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15264pub struct EXTENDED_SYS_STATE_DATA {
15265    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
15266    pub vtol_state: MavVtolState,
15267    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15268    pub landed_state: MavLandedState,
15269}
15270impl EXTENDED_SYS_STATE_DATA {
15271    pub const ENCODED_LEN: usize = 2usize;
15272    pub const DEFAULT: Self = Self {
15273        vtol_state: MavVtolState::DEFAULT,
15274        landed_state: MavLandedState::DEFAULT,
15275    };
15276    #[cfg(feature = "arbitrary")]
15277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15278        use arbitrary::{Arbitrary, Unstructured};
15279        let mut buf = [0u8; 1024];
15280        rng.fill_bytes(&mut buf);
15281        let mut unstructured = Unstructured::new(&buf);
15282        Self::arbitrary(&mut unstructured).unwrap_or_default()
15283    }
15284}
15285impl Default for EXTENDED_SYS_STATE_DATA {
15286    fn default() -> Self {
15287        Self::DEFAULT.clone()
15288    }
15289}
15290impl MessageData for EXTENDED_SYS_STATE_DATA {
15291    type Message = MavMessage;
15292    const ID: u32 = 245u32;
15293    const NAME: &'static str = "EXTENDED_SYS_STATE";
15294    const EXTRA_CRC: u8 = 130u8;
15295    const ENCODED_LEN: usize = 2usize;
15296    fn deser(
15297        _version: MavlinkVersion,
15298        __input: &[u8],
15299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15300        let avail_len = __input.len();
15301        let mut payload_buf = [0; Self::ENCODED_LEN];
15302        let mut buf = if avail_len < Self::ENCODED_LEN {
15303            payload_buf[0..avail_len].copy_from_slice(__input);
15304            Bytes::new(&payload_buf)
15305        } else {
15306            Bytes::new(__input)
15307        };
15308        let mut __struct = Self::default();
15309        let tmp = buf.get_u8();
15310        __struct.vtol_state =
15311            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15312                enum_type: "MavVtolState",
15313                value: tmp as u32,
15314            })?;
15315        let tmp = buf.get_u8();
15316        __struct.landed_state =
15317            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15318                enum_type: "MavLandedState",
15319                value: tmp as u32,
15320            })?;
15321        Ok(__struct)
15322    }
15323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15324        let mut __tmp = BytesMut::new(bytes);
15325        #[allow(clippy::absurd_extreme_comparisons)]
15326        #[allow(unused_comparisons)]
15327        if __tmp.remaining() < Self::ENCODED_LEN {
15328            panic!(
15329                "buffer is too small (need {} bytes, but got {})",
15330                Self::ENCODED_LEN,
15331                __tmp.remaining(),
15332            )
15333        }
15334        __tmp.put_u8(self.vtol_state as u8);
15335        __tmp.put_u8(self.landed_state as u8);
15336        if matches!(version, MavlinkVersion::V2) {
15337            let len = __tmp.len();
15338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15339        } else {
15340            __tmp.len()
15341        }
15342    }
15343}
15344#[doc = "id: 223"]
15345#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
15346#[derive(Debug, Clone, PartialEq)]
15347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15349pub struct COMMAND_INT_STAMPED_DATA {
15350    #[doc = "Microseconds elapsed since vehicle boot"]
15351    pub vehicle_timestamp: u64,
15352    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
15353    pub utc_time: u32,
15354    #[doc = "PARAM1, see MAV_CMD enum"]
15355    pub param1: f32,
15356    #[doc = "PARAM2, see MAV_CMD enum"]
15357    pub param2: f32,
15358    #[doc = "PARAM3, see MAV_CMD enum"]
15359    pub param3: f32,
15360    #[doc = "PARAM4, see MAV_CMD enum"]
15361    pub param4: f32,
15362    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
15363    pub x: i32,
15364    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
15365    pub y: i32,
15366    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
15367    pub z: f32,
15368    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
15369    pub command: MavCmd,
15370    #[doc = "System ID"]
15371    pub target_system: u8,
15372    #[doc = "Component ID"]
15373    pub target_component: u8,
15374    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
15375    pub frame: MavFrame,
15376    #[doc = "false:0, true:1"]
15377    pub current: u8,
15378    #[doc = "autocontinue to next wp"]
15379    pub autocontinue: u8,
15380}
15381impl COMMAND_INT_STAMPED_DATA {
15382    pub const ENCODED_LEN: usize = 47usize;
15383    pub const DEFAULT: Self = Self {
15384        vehicle_timestamp: 0_u64,
15385        utc_time: 0_u32,
15386        param1: 0.0_f32,
15387        param2: 0.0_f32,
15388        param3: 0.0_f32,
15389        param4: 0.0_f32,
15390        x: 0_i32,
15391        y: 0_i32,
15392        z: 0.0_f32,
15393        command: MavCmd::DEFAULT,
15394        target_system: 0_u8,
15395        target_component: 0_u8,
15396        frame: MavFrame::DEFAULT,
15397        current: 0_u8,
15398        autocontinue: 0_u8,
15399    };
15400    #[cfg(feature = "arbitrary")]
15401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15402        use arbitrary::{Arbitrary, Unstructured};
15403        let mut buf = [0u8; 1024];
15404        rng.fill_bytes(&mut buf);
15405        let mut unstructured = Unstructured::new(&buf);
15406        Self::arbitrary(&mut unstructured).unwrap_or_default()
15407    }
15408}
15409impl Default for COMMAND_INT_STAMPED_DATA {
15410    fn default() -> Self {
15411        Self::DEFAULT.clone()
15412    }
15413}
15414impl MessageData for COMMAND_INT_STAMPED_DATA {
15415    type Message = MavMessage;
15416    const ID: u32 = 223u32;
15417    const NAME: &'static str = "COMMAND_INT_STAMPED";
15418    const EXTRA_CRC: u8 = 119u8;
15419    const ENCODED_LEN: usize = 47usize;
15420    fn deser(
15421        _version: MavlinkVersion,
15422        __input: &[u8],
15423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15424        let avail_len = __input.len();
15425        let mut payload_buf = [0; Self::ENCODED_LEN];
15426        let mut buf = if avail_len < Self::ENCODED_LEN {
15427            payload_buf[0..avail_len].copy_from_slice(__input);
15428            Bytes::new(&payload_buf)
15429        } else {
15430            Bytes::new(__input)
15431        };
15432        let mut __struct = Self::default();
15433        __struct.vehicle_timestamp = buf.get_u64_le();
15434        __struct.utc_time = buf.get_u32_le();
15435        __struct.param1 = buf.get_f32_le();
15436        __struct.param2 = buf.get_f32_le();
15437        __struct.param3 = buf.get_f32_le();
15438        __struct.param4 = buf.get_f32_le();
15439        __struct.x = buf.get_i32_le();
15440        __struct.y = buf.get_i32_le();
15441        __struct.z = buf.get_f32_le();
15442        let tmp = buf.get_u16_le();
15443        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
15444            ::mavlink_core::error::ParserError::InvalidEnum {
15445                enum_type: "MavCmd",
15446                value: tmp as u32,
15447            },
15448        )?;
15449        __struct.target_system = buf.get_u8();
15450        __struct.target_component = buf.get_u8();
15451        let tmp = buf.get_u8();
15452        __struct.frame =
15453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15454                enum_type: "MavFrame",
15455                value: tmp as u32,
15456            })?;
15457        __struct.current = buf.get_u8();
15458        __struct.autocontinue = buf.get_u8();
15459        Ok(__struct)
15460    }
15461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15462        let mut __tmp = BytesMut::new(bytes);
15463        #[allow(clippy::absurd_extreme_comparisons)]
15464        #[allow(unused_comparisons)]
15465        if __tmp.remaining() < Self::ENCODED_LEN {
15466            panic!(
15467                "buffer is too small (need {} bytes, but got {})",
15468                Self::ENCODED_LEN,
15469                __tmp.remaining(),
15470            )
15471        }
15472        __tmp.put_u64_le(self.vehicle_timestamp);
15473        __tmp.put_u32_le(self.utc_time);
15474        __tmp.put_f32_le(self.param1);
15475        __tmp.put_f32_le(self.param2);
15476        __tmp.put_f32_le(self.param3);
15477        __tmp.put_f32_le(self.param4);
15478        __tmp.put_i32_le(self.x);
15479        __tmp.put_i32_le(self.y);
15480        __tmp.put_f32_le(self.z);
15481        __tmp.put_u16_le(self.command as u16);
15482        __tmp.put_u8(self.target_system);
15483        __tmp.put_u8(self.target_component);
15484        __tmp.put_u8(self.frame as u8);
15485        __tmp.put_u8(self.current);
15486        __tmp.put_u8(self.autocontinue);
15487        if matches!(version, MavlinkVersion::V2) {
15488            let len = __tmp.len();
15489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15490        } else {
15491            __tmp.len()
15492        }
15493    }
15494}
15495#[doc = "id: 48"]
15496#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
15497#[derive(Debug, Clone, PartialEq)]
15498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15500pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
15501    #[doc = "Latitude (WGS84)"]
15502    pub latitude: i32,
15503    #[doc = "Longitude (WGS84)"]
15504    pub longitude: i32,
15505    #[doc = "Altitude (MSL). Positive for up."]
15506    pub altitude: i32,
15507    #[doc = "System ID"]
15508    pub target_system: u8,
15509    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15510    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15511    pub time_usec: u64,
15512}
15513impl SET_GPS_GLOBAL_ORIGIN_DATA {
15514    pub const ENCODED_LEN: usize = 21usize;
15515    pub const DEFAULT: Self = Self {
15516        latitude: 0_i32,
15517        longitude: 0_i32,
15518        altitude: 0_i32,
15519        target_system: 0_u8,
15520        time_usec: 0_u64,
15521    };
15522    #[cfg(feature = "arbitrary")]
15523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15524        use arbitrary::{Arbitrary, Unstructured};
15525        let mut buf = [0u8; 1024];
15526        rng.fill_bytes(&mut buf);
15527        let mut unstructured = Unstructured::new(&buf);
15528        Self::arbitrary(&mut unstructured).unwrap_or_default()
15529    }
15530}
15531impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
15532    fn default() -> Self {
15533        Self::DEFAULT.clone()
15534    }
15535}
15536impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
15537    type Message = MavMessage;
15538    const ID: u32 = 48u32;
15539    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
15540    const EXTRA_CRC: u8 = 41u8;
15541    const ENCODED_LEN: usize = 21usize;
15542    fn deser(
15543        _version: MavlinkVersion,
15544        __input: &[u8],
15545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15546        let avail_len = __input.len();
15547        let mut payload_buf = [0; Self::ENCODED_LEN];
15548        let mut buf = if avail_len < Self::ENCODED_LEN {
15549            payload_buf[0..avail_len].copy_from_slice(__input);
15550            Bytes::new(&payload_buf)
15551        } else {
15552            Bytes::new(__input)
15553        };
15554        let mut __struct = Self::default();
15555        __struct.latitude = buf.get_i32_le();
15556        __struct.longitude = buf.get_i32_le();
15557        __struct.altitude = buf.get_i32_le();
15558        __struct.target_system = buf.get_u8();
15559        __struct.time_usec = buf.get_u64_le();
15560        Ok(__struct)
15561    }
15562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15563        let mut __tmp = BytesMut::new(bytes);
15564        #[allow(clippy::absurd_extreme_comparisons)]
15565        #[allow(unused_comparisons)]
15566        if __tmp.remaining() < Self::ENCODED_LEN {
15567            panic!(
15568                "buffer is too small (need {} bytes, but got {})",
15569                Self::ENCODED_LEN,
15570                __tmp.remaining(),
15571            )
15572        }
15573        __tmp.put_i32_le(self.latitude);
15574        __tmp.put_i32_le(self.longitude);
15575        __tmp.put_i32_le(self.altitude);
15576        __tmp.put_u8(self.target_system);
15577        __tmp.put_u64_le(self.time_usec);
15578        if matches!(version, MavlinkVersion::V2) {
15579            let len = __tmp.len();
15580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15581        } else {
15582            __tmp.len()
15583        }
15584    }
15585}
15586#[doc = "id: 281"]
15587#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
15588#[derive(Debug, Clone, PartialEq)]
15589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15591pub struct GIMBAL_MANAGER_STATUS_DATA {
15592    #[doc = "Timestamp (time since system boot)."]
15593    pub time_boot_ms: u32,
15594    #[doc = "High level gimbal manager flags currently applied."]
15595    pub flags: GimbalManagerFlags,
15596    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15597    pub gimbal_device_id: u8,
15598    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
15599    pub primary_control_sysid: u8,
15600    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
15601    pub primary_control_compid: u8,
15602    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
15603    pub secondary_control_sysid: u8,
15604    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
15605    pub secondary_control_compid: u8,
15606}
15607impl GIMBAL_MANAGER_STATUS_DATA {
15608    pub const ENCODED_LEN: usize = 13usize;
15609    pub const DEFAULT: Self = Self {
15610        time_boot_ms: 0_u32,
15611        flags: GimbalManagerFlags::DEFAULT,
15612        gimbal_device_id: 0_u8,
15613        primary_control_sysid: 0_u8,
15614        primary_control_compid: 0_u8,
15615        secondary_control_sysid: 0_u8,
15616        secondary_control_compid: 0_u8,
15617    };
15618    #[cfg(feature = "arbitrary")]
15619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15620        use arbitrary::{Arbitrary, Unstructured};
15621        let mut buf = [0u8; 1024];
15622        rng.fill_bytes(&mut buf);
15623        let mut unstructured = Unstructured::new(&buf);
15624        Self::arbitrary(&mut unstructured).unwrap_or_default()
15625    }
15626}
15627impl Default for GIMBAL_MANAGER_STATUS_DATA {
15628    fn default() -> Self {
15629        Self::DEFAULT.clone()
15630    }
15631}
15632impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
15633    type Message = MavMessage;
15634    const ID: u32 = 281u32;
15635    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
15636    const EXTRA_CRC: u8 = 48u8;
15637    const ENCODED_LEN: usize = 13usize;
15638    fn deser(
15639        _version: MavlinkVersion,
15640        __input: &[u8],
15641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15642        let avail_len = __input.len();
15643        let mut payload_buf = [0; Self::ENCODED_LEN];
15644        let mut buf = if avail_len < Self::ENCODED_LEN {
15645            payload_buf[0..avail_len].copy_from_slice(__input);
15646            Bytes::new(&payload_buf)
15647        } else {
15648            Bytes::new(__input)
15649        };
15650        let mut __struct = Self::default();
15651        __struct.time_boot_ms = buf.get_u32_le();
15652        let tmp = buf.get_u32_le();
15653        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
15654            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15655                flag_type: "GimbalManagerFlags",
15656                value: tmp as u32,
15657            })?;
15658        __struct.gimbal_device_id = buf.get_u8();
15659        __struct.primary_control_sysid = buf.get_u8();
15660        __struct.primary_control_compid = buf.get_u8();
15661        __struct.secondary_control_sysid = buf.get_u8();
15662        __struct.secondary_control_compid = buf.get_u8();
15663        Ok(__struct)
15664    }
15665    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15666        let mut __tmp = BytesMut::new(bytes);
15667        #[allow(clippy::absurd_extreme_comparisons)]
15668        #[allow(unused_comparisons)]
15669        if __tmp.remaining() < Self::ENCODED_LEN {
15670            panic!(
15671                "buffer is too small (need {} bytes, but got {})",
15672                Self::ENCODED_LEN,
15673                __tmp.remaining(),
15674            )
15675        }
15676        __tmp.put_u32_le(self.time_boot_ms);
15677        __tmp.put_u32_le(self.flags.bits());
15678        __tmp.put_u8(self.gimbal_device_id);
15679        __tmp.put_u8(self.primary_control_sysid);
15680        __tmp.put_u8(self.primary_control_compid);
15681        __tmp.put_u8(self.secondary_control_sysid);
15682        __tmp.put_u8(self.secondary_control_compid);
15683        if matches!(version, MavlinkVersion::V2) {
15684            let len = __tmp.len();
15685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15686        } else {
15687            __tmp.len()
15688        }
15689    }
15690}
15691#[doc = "id: 84"]
15692#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
15693#[derive(Debug, Clone, PartialEq)]
15694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15696pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
15697    #[doc = "Timestamp (time since system boot)."]
15698    pub time_boot_ms: u32,
15699    #[doc = "X Position in NED frame"]
15700    pub x: f32,
15701    #[doc = "Y Position in NED frame"]
15702    pub y: f32,
15703    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
15704    pub z: f32,
15705    #[doc = "X velocity in NED frame"]
15706    pub vx: f32,
15707    #[doc = "Y velocity in NED frame"]
15708    pub vy: f32,
15709    #[doc = "Z velocity in NED frame"]
15710    pub vz: f32,
15711    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15712    pub afx: f32,
15713    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15714    pub afy: f32,
15715    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
15716    pub afz: f32,
15717    #[doc = "yaw setpoint"]
15718    pub yaw: f32,
15719    #[doc = "yaw rate setpoint"]
15720    pub yaw_rate: f32,
15721    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
15722    pub type_mask: PositionTargetTypemask,
15723    #[doc = "System ID"]
15724    pub target_system: u8,
15725    #[doc = "Component ID"]
15726    pub target_component: u8,
15727    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
15728    pub coordinate_frame: MavFrame,
15729}
15730impl SET_POSITION_TARGET_LOCAL_NED_DATA {
15731    pub const ENCODED_LEN: usize = 53usize;
15732    pub const DEFAULT: Self = Self {
15733        time_boot_ms: 0_u32,
15734        x: 0.0_f32,
15735        y: 0.0_f32,
15736        z: 0.0_f32,
15737        vx: 0.0_f32,
15738        vy: 0.0_f32,
15739        vz: 0.0_f32,
15740        afx: 0.0_f32,
15741        afy: 0.0_f32,
15742        afz: 0.0_f32,
15743        yaw: 0.0_f32,
15744        yaw_rate: 0.0_f32,
15745        type_mask: PositionTargetTypemask::DEFAULT,
15746        target_system: 0_u8,
15747        target_component: 0_u8,
15748        coordinate_frame: MavFrame::DEFAULT,
15749    };
15750    #[cfg(feature = "arbitrary")]
15751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15752        use arbitrary::{Arbitrary, Unstructured};
15753        let mut buf = [0u8; 1024];
15754        rng.fill_bytes(&mut buf);
15755        let mut unstructured = Unstructured::new(&buf);
15756        Self::arbitrary(&mut unstructured).unwrap_or_default()
15757    }
15758}
15759impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
15760    fn default() -> Self {
15761        Self::DEFAULT.clone()
15762    }
15763}
15764impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
15765    type Message = MavMessage;
15766    const ID: u32 = 84u32;
15767    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
15768    const EXTRA_CRC: u8 = 143u8;
15769    const ENCODED_LEN: usize = 53usize;
15770    fn deser(
15771        _version: MavlinkVersion,
15772        __input: &[u8],
15773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15774        let avail_len = __input.len();
15775        let mut payload_buf = [0; Self::ENCODED_LEN];
15776        let mut buf = if avail_len < Self::ENCODED_LEN {
15777            payload_buf[0..avail_len].copy_from_slice(__input);
15778            Bytes::new(&payload_buf)
15779        } else {
15780            Bytes::new(__input)
15781        };
15782        let mut __struct = Self::default();
15783        __struct.time_boot_ms = buf.get_u32_le();
15784        __struct.x = buf.get_f32_le();
15785        __struct.y = buf.get_f32_le();
15786        __struct.z = buf.get_f32_le();
15787        __struct.vx = buf.get_f32_le();
15788        __struct.vy = buf.get_f32_le();
15789        __struct.vz = buf.get_f32_le();
15790        __struct.afx = buf.get_f32_le();
15791        __struct.afy = buf.get_f32_le();
15792        __struct.afz = buf.get_f32_le();
15793        __struct.yaw = buf.get_f32_le();
15794        __struct.yaw_rate = buf.get_f32_le();
15795        let tmp = buf.get_u16_le();
15796        __struct.type_mask = PositionTargetTypemask::from_bits(
15797            tmp & PositionTargetTypemask::all().bits(),
15798        )
15799        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15800            flag_type: "PositionTargetTypemask",
15801            value: tmp as u32,
15802        })?;
15803        __struct.target_system = buf.get_u8();
15804        __struct.target_component = buf.get_u8();
15805        let tmp = buf.get_u8();
15806        __struct.coordinate_frame =
15807            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15808                enum_type: "MavFrame",
15809                value: tmp as u32,
15810            })?;
15811        Ok(__struct)
15812    }
15813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15814        let mut __tmp = BytesMut::new(bytes);
15815        #[allow(clippy::absurd_extreme_comparisons)]
15816        #[allow(unused_comparisons)]
15817        if __tmp.remaining() < Self::ENCODED_LEN {
15818            panic!(
15819                "buffer is too small (need {} bytes, but got {})",
15820                Self::ENCODED_LEN,
15821                __tmp.remaining(),
15822            )
15823        }
15824        __tmp.put_u32_le(self.time_boot_ms);
15825        __tmp.put_f32_le(self.x);
15826        __tmp.put_f32_le(self.y);
15827        __tmp.put_f32_le(self.z);
15828        __tmp.put_f32_le(self.vx);
15829        __tmp.put_f32_le(self.vy);
15830        __tmp.put_f32_le(self.vz);
15831        __tmp.put_f32_le(self.afx);
15832        __tmp.put_f32_le(self.afy);
15833        __tmp.put_f32_le(self.afz);
15834        __tmp.put_f32_le(self.yaw);
15835        __tmp.put_f32_le(self.yaw_rate);
15836        __tmp.put_u16_le(self.type_mask.bits());
15837        __tmp.put_u8(self.target_system);
15838        __tmp.put_u8(self.target_component);
15839        __tmp.put_u8(self.coordinate_frame as u8);
15840        if matches!(version, MavlinkVersion::V2) {
15841            let len = __tmp.len();
15842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15843        } else {
15844            __tmp.len()
15845        }
15846    }
15847}
15848#[doc = "id: 247"]
15849#[doc = "Information about a potential collision."]
15850#[derive(Debug, Clone, PartialEq)]
15851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15853pub struct COLLISION_DATA {
15854    #[doc = "Unique identifier, domain based on src field"]
15855    pub id: u32,
15856    #[doc = "Estimated time until collision occurs"]
15857    pub time_to_minimum_delta: f32,
15858    #[doc = "Closest vertical distance between vehicle and object"]
15859    pub altitude_minimum_delta: f32,
15860    #[doc = "Closest horizontal distance between vehicle and object"]
15861    pub horizontal_minimum_delta: f32,
15862    #[doc = "Collision data source"]
15863    pub src: MavCollisionSrc,
15864    #[doc = "Action that is being taken to avoid this collision"]
15865    pub action: MavCollisionAction,
15866    #[doc = "How concerned the aircraft is about this collision"]
15867    pub threat_level: MavCollisionThreatLevel,
15868}
15869impl COLLISION_DATA {
15870    pub const ENCODED_LEN: usize = 19usize;
15871    pub const DEFAULT: Self = Self {
15872        id: 0_u32,
15873        time_to_minimum_delta: 0.0_f32,
15874        altitude_minimum_delta: 0.0_f32,
15875        horizontal_minimum_delta: 0.0_f32,
15876        src: MavCollisionSrc::DEFAULT,
15877        action: MavCollisionAction::DEFAULT,
15878        threat_level: MavCollisionThreatLevel::DEFAULT,
15879    };
15880    #[cfg(feature = "arbitrary")]
15881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15882        use arbitrary::{Arbitrary, Unstructured};
15883        let mut buf = [0u8; 1024];
15884        rng.fill_bytes(&mut buf);
15885        let mut unstructured = Unstructured::new(&buf);
15886        Self::arbitrary(&mut unstructured).unwrap_or_default()
15887    }
15888}
15889impl Default for COLLISION_DATA {
15890    fn default() -> Self {
15891        Self::DEFAULT.clone()
15892    }
15893}
15894impl MessageData for COLLISION_DATA {
15895    type Message = MavMessage;
15896    const ID: u32 = 247u32;
15897    const NAME: &'static str = "COLLISION";
15898    const EXTRA_CRC: u8 = 81u8;
15899    const ENCODED_LEN: usize = 19usize;
15900    fn deser(
15901        _version: MavlinkVersion,
15902        __input: &[u8],
15903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15904        let avail_len = __input.len();
15905        let mut payload_buf = [0; Self::ENCODED_LEN];
15906        let mut buf = if avail_len < Self::ENCODED_LEN {
15907            payload_buf[0..avail_len].copy_from_slice(__input);
15908            Bytes::new(&payload_buf)
15909        } else {
15910            Bytes::new(__input)
15911        };
15912        let mut __struct = Self::default();
15913        __struct.id = buf.get_u32_le();
15914        __struct.time_to_minimum_delta = buf.get_f32_le();
15915        __struct.altitude_minimum_delta = buf.get_f32_le();
15916        __struct.horizontal_minimum_delta = buf.get_f32_le();
15917        let tmp = buf.get_u8();
15918        __struct.src =
15919            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15920                enum_type: "MavCollisionSrc",
15921                value: tmp as u32,
15922            })?;
15923        let tmp = buf.get_u8();
15924        __struct.action =
15925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15926                enum_type: "MavCollisionAction",
15927                value: tmp as u32,
15928            })?;
15929        let tmp = buf.get_u8();
15930        __struct.threat_level =
15931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15932                enum_type: "MavCollisionThreatLevel",
15933                value: tmp as u32,
15934            })?;
15935        Ok(__struct)
15936    }
15937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15938        let mut __tmp = BytesMut::new(bytes);
15939        #[allow(clippy::absurd_extreme_comparisons)]
15940        #[allow(unused_comparisons)]
15941        if __tmp.remaining() < Self::ENCODED_LEN {
15942            panic!(
15943                "buffer is too small (need {} bytes, but got {})",
15944                Self::ENCODED_LEN,
15945                __tmp.remaining(),
15946            )
15947        }
15948        __tmp.put_u32_le(self.id);
15949        __tmp.put_f32_le(self.time_to_minimum_delta);
15950        __tmp.put_f32_le(self.altitude_minimum_delta);
15951        __tmp.put_f32_le(self.horizontal_minimum_delta);
15952        __tmp.put_u8(self.src as u8);
15953        __tmp.put_u8(self.action as u8);
15954        __tmp.put_u8(self.threat_level as u8);
15955        if matches!(version, MavlinkVersion::V2) {
15956            let len = __tmp.len();
15957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15958        } else {
15959            __tmp.len()
15960        }
15961    }
15962}
15963#[doc = "id: 265"]
15964#[doc = "Orientation of a mount."]
15965#[derive(Debug, Clone, PartialEq)]
15966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15968pub struct MOUNT_ORIENTATION_DATA {
15969    #[doc = "Timestamp (time since system boot)."]
15970    pub time_boot_ms: u32,
15971    #[doc = "Roll in global frame (set to NaN for invalid)."]
15972    pub roll: f32,
15973    #[doc = "Pitch in global frame (set to NaN for invalid)."]
15974    pub pitch: f32,
15975    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
15976    pub yaw: f32,
15977    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
15978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15979    pub yaw_absolute: f32,
15980}
15981impl MOUNT_ORIENTATION_DATA {
15982    pub const ENCODED_LEN: usize = 20usize;
15983    pub const DEFAULT: Self = Self {
15984        time_boot_ms: 0_u32,
15985        roll: 0.0_f32,
15986        pitch: 0.0_f32,
15987        yaw: 0.0_f32,
15988        yaw_absolute: 0.0_f32,
15989    };
15990    #[cfg(feature = "arbitrary")]
15991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15992        use arbitrary::{Arbitrary, Unstructured};
15993        let mut buf = [0u8; 1024];
15994        rng.fill_bytes(&mut buf);
15995        let mut unstructured = Unstructured::new(&buf);
15996        Self::arbitrary(&mut unstructured).unwrap_or_default()
15997    }
15998}
15999impl Default for MOUNT_ORIENTATION_DATA {
16000    fn default() -> Self {
16001        Self::DEFAULT.clone()
16002    }
16003}
16004impl MessageData for MOUNT_ORIENTATION_DATA {
16005    type Message = MavMessage;
16006    const ID: u32 = 265u32;
16007    const NAME: &'static str = "MOUNT_ORIENTATION";
16008    const EXTRA_CRC: u8 = 26u8;
16009    const ENCODED_LEN: usize = 20usize;
16010    fn deser(
16011        _version: MavlinkVersion,
16012        __input: &[u8],
16013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16014        let avail_len = __input.len();
16015        let mut payload_buf = [0; Self::ENCODED_LEN];
16016        let mut buf = if avail_len < Self::ENCODED_LEN {
16017            payload_buf[0..avail_len].copy_from_slice(__input);
16018            Bytes::new(&payload_buf)
16019        } else {
16020            Bytes::new(__input)
16021        };
16022        let mut __struct = Self::default();
16023        __struct.time_boot_ms = buf.get_u32_le();
16024        __struct.roll = buf.get_f32_le();
16025        __struct.pitch = buf.get_f32_le();
16026        __struct.yaw = buf.get_f32_le();
16027        __struct.yaw_absolute = buf.get_f32_le();
16028        Ok(__struct)
16029    }
16030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16031        let mut __tmp = BytesMut::new(bytes);
16032        #[allow(clippy::absurd_extreme_comparisons)]
16033        #[allow(unused_comparisons)]
16034        if __tmp.remaining() < Self::ENCODED_LEN {
16035            panic!(
16036                "buffer is too small (need {} bytes, but got {})",
16037                Self::ENCODED_LEN,
16038                __tmp.remaining(),
16039            )
16040        }
16041        __tmp.put_u32_le(self.time_boot_ms);
16042        __tmp.put_f32_le(self.roll);
16043        __tmp.put_f32_le(self.pitch);
16044        __tmp.put_f32_le(self.yaw);
16045        __tmp.put_f32_le(self.yaw_absolute);
16046        if matches!(version, MavlinkVersion::V2) {
16047            let len = __tmp.len();
16048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16049        } else {
16050            __tmp.len()
16051        }
16052    }
16053}
16054#[doc = "id: 264"]
16055#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
16056#[derive(Debug, Clone, PartialEq)]
16057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16059pub struct FLIGHT_INFORMATION_DATA {
16060    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
16061    pub arming_time_utc: u64,
16062    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
16063    pub takeoff_time_utc: u64,
16064    #[doc = "Flight number. Note, field is misnamed UUID."]
16065    pub flight_uuid: u64,
16066    #[doc = "Timestamp (time since system boot)."]
16067    pub time_boot_ms: u32,
16068    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
16069    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16070    pub landing_time: u32,
16071}
16072impl FLIGHT_INFORMATION_DATA {
16073    pub const ENCODED_LEN: usize = 32usize;
16074    pub const DEFAULT: Self = Self {
16075        arming_time_utc: 0_u64,
16076        takeoff_time_utc: 0_u64,
16077        flight_uuid: 0_u64,
16078        time_boot_ms: 0_u32,
16079        landing_time: 0_u32,
16080    };
16081    #[cfg(feature = "arbitrary")]
16082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16083        use arbitrary::{Arbitrary, Unstructured};
16084        let mut buf = [0u8; 1024];
16085        rng.fill_bytes(&mut buf);
16086        let mut unstructured = Unstructured::new(&buf);
16087        Self::arbitrary(&mut unstructured).unwrap_or_default()
16088    }
16089}
16090impl Default for FLIGHT_INFORMATION_DATA {
16091    fn default() -> Self {
16092        Self::DEFAULT.clone()
16093    }
16094}
16095impl MessageData for FLIGHT_INFORMATION_DATA {
16096    type Message = MavMessage;
16097    const ID: u32 = 264u32;
16098    const NAME: &'static str = "FLIGHT_INFORMATION";
16099    const EXTRA_CRC: u8 = 49u8;
16100    const ENCODED_LEN: usize = 32usize;
16101    fn deser(
16102        _version: MavlinkVersion,
16103        __input: &[u8],
16104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16105        let avail_len = __input.len();
16106        let mut payload_buf = [0; Self::ENCODED_LEN];
16107        let mut buf = if avail_len < Self::ENCODED_LEN {
16108            payload_buf[0..avail_len].copy_from_slice(__input);
16109            Bytes::new(&payload_buf)
16110        } else {
16111            Bytes::new(__input)
16112        };
16113        let mut __struct = Self::default();
16114        __struct.arming_time_utc = buf.get_u64_le();
16115        __struct.takeoff_time_utc = buf.get_u64_le();
16116        __struct.flight_uuid = buf.get_u64_le();
16117        __struct.time_boot_ms = buf.get_u32_le();
16118        __struct.landing_time = buf.get_u32_le();
16119        Ok(__struct)
16120    }
16121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16122        let mut __tmp = BytesMut::new(bytes);
16123        #[allow(clippy::absurd_extreme_comparisons)]
16124        #[allow(unused_comparisons)]
16125        if __tmp.remaining() < Self::ENCODED_LEN {
16126            panic!(
16127                "buffer is too small (need {} bytes, but got {})",
16128                Self::ENCODED_LEN,
16129                __tmp.remaining(),
16130            )
16131        }
16132        __tmp.put_u64_le(self.arming_time_utc);
16133        __tmp.put_u64_le(self.takeoff_time_utc);
16134        __tmp.put_u64_le(self.flight_uuid);
16135        __tmp.put_u32_le(self.time_boot_ms);
16136        __tmp.put_u32_le(self.landing_time);
16137        if matches!(version, MavlinkVersion::V2) {
16138            let len = __tmp.len();
16139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16140        } else {
16141            __tmp.len()
16142        }
16143    }
16144}
16145#[doc = "id: 283"]
16146#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
16147#[derive(Debug, Clone, PartialEq)]
16148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16150pub struct GIMBAL_DEVICE_INFORMATION_DATA {
16151    #[doc = "UID of gimbal hardware (0 if unknown)."]
16152    pub uid: u64,
16153    #[doc = "Timestamp (time since system boot)."]
16154    pub time_boot_ms: u32,
16155    #[doc = "0xff)."]
16156    pub firmware_version: u32,
16157    #[doc = "0xff)."]
16158    pub hardware_version: u32,
16159    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
16160    pub roll_min: f32,
16161    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
16162    pub roll_max: f32,
16163    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
16164    pub pitch_min: f32,
16165    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
16166    pub pitch_max: f32,
16167    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
16168    pub yaw_min: f32,
16169    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
16170    pub yaw_max: f32,
16171    #[doc = "Bitmap of gimbal capability flags."]
16172    pub cap_flags: GimbalDeviceCapFlags,
16173    #[doc = "Bitmap for use for gimbal-specific capability flags."]
16174    pub custom_cap_flags: u16,
16175    #[doc = "Name of the gimbal vendor."]
16176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16177    pub vendor_name: [u8; 32],
16178    #[doc = "Name of the gimbal model."]
16179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16180    pub model_name: [u8; 32],
16181    #[doc = "Custom name of the gimbal given to it by the user."]
16182    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16183    pub custom_name: [u8; 32],
16184    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
16185    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16186    pub gimbal_device_id: u8,
16187}
16188impl GIMBAL_DEVICE_INFORMATION_DATA {
16189    pub const ENCODED_LEN: usize = 145usize;
16190    pub const DEFAULT: Self = Self {
16191        uid: 0_u64,
16192        time_boot_ms: 0_u32,
16193        firmware_version: 0_u32,
16194        hardware_version: 0_u32,
16195        roll_min: 0.0_f32,
16196        roll_max: 0.0_f32,
16197        pitch_min: 0.0_f32,
16198        pitch_max: 0.0_f32,
16199        yaw_min: 0.0_f32,
16200        yaw_max: 0.0_f32,
16201        cap_flags: GimbalDeviceCapFlags::DEFAULT,
16202        custom_cap_flags: 0_u16,
16203        vendor_name: [0_u8; 32usize],
16204        model_name: [0_u8; 32usize],
16205        custom_name: [0_u8; 32usize],
16206        gimbal_device_id: 0_u8,
16207    };
16208    #[cfg(feature = "arbitrary")]
16209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16210        use arbitrary::{Arbitrary, Unstructured};
16211        let mut buf = [0u8; 1024];
16212        rng.fill_bytes(&mut buf);
16213        let mut unstructured = Unstructured::new(&buf);
16214        Self::arbitrary(&mut unstructured).unwrap_or_default()
16215    }
16216}
16217impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
16218    fn default() -> Self {
16219        Self::DEFAULT.clone()
16220    }
16221}
16222impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
16223    type Message = MavMessage;
16224    const ID: u32 = 283u32;
16225    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
16226    const EXTRA_CRC: u8 = 74u8;
16227    const ENCODED_LEN: usize = 145usize;
16228    fn deser(
16229        _version: MavlinkVersion,
16230        __input: &[u8],
16231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16232        let avail_len = __input.len();
16233        let mut payload_buf = [0; Self::ENCODED_LEN];
16234        let mut buf = if avail_len < Self::ENCODED_LEN {
16235            payload_buf[0..avail_len].copy_from_slice(__input);
16236            Bytes::new(&payload_buf)
16237        } else {
16238            Bytes::new(__input)
16239        };
16240        let mut __struct = Self::default();
16241        __struct.uid = buf.get_u64_le();
16242        __struct.time_boot_ms = buf.get_u32_le();
16243        __struct.firmware_version = buf.get_u32_le();
16244        __struct.hardware_version = buf.get_u32_le();
16245        __struct.roll_min = buf.get_f32_le();
16246        __struct.roll_max = buf.get_f32_le();
16247        __struct.pitch_min = buf.get_f32_le();
16248        __struct.pitch_max = buf.get_f32_le();
16249        __struct.yaw_min = buf.get_f32_le();
16250        __struct.yaw_max = buf.get_f32_le();
16251        let tmp = buf.get_u16_le();
16252        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
16253            tmp & GimbalDeviceCapFlags::all().bits(),
16254        )
16255        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16256            flag_type: "GimbalDeviceCapFlags",
16257            value: tmp as u32,
16258        })?;
16259        __struct.custom_cap_flags = buf.get_u16_le();
16260        for v in &mut __struct.vendor_name {
16261            let val = buf.get_u8();
16262            *v = val;
16263        }
16264        for v in &mut __struct.model_name {
16265            let val = buf.get_u8();
16266            *v = val;
16267        }
16268        for v in &mut __struct.custom_name {
16269            let val = buf.get_u8();
16270            *v = val;
16271        }
16272        __struct.gimbal_device_id = buf.get_u8();
16273        Ok(__struct)
16274    }
16275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16276        let mut __tmp = BytesMut::new(bytes);
16277        #[allow(clippy::absurd_extreme_comparisons)]
16278        #[allow(unused_comparisons)]
16279        if __tmp.remaining() < Self::ENCODED_LEN {
16280            panic!(
16281                "buffer is too small (need {} bytes, but got {})",
16282                Self::ENCODED_LEN,
16283                __tmp.remaining(),
16284            )
16285        }
16286        __tmp.put_u64_le(self.uid);
16287        __tmp.put_u32_le(self.time_boot_ms);
16288        __tmp.put_u32_le(self.firmware_version);
16289        __tmp.put_u32_le(self.hardware_version);
16290        __tmp.put_f32_le(self.roll_min);
16291        __tmp.put_f32_le(self.roll_max);
16292        __tmp.put_f32_le(self.pitch_min);
16293        __tmp.put_f32_le(self.pitch_max);
16294        __tmp.put_f32_le(self.yaw_min);
16295        __tmp.put_f32_le(self.yaw_max);
16296        __tmp.put_u16_le(self.cap_flags.bits());
16297        __tmp.put_u16_le(self.custom_cap_flags);
16298        for val in &self.vendor_name {
16299            __tmp.put_u8(*val);
16300        }
16301        for val in &self.model_name {
16302            __tmp.put_u8(*val);
16303        }
16304        for val in &self.custom_name {
16305            __tmp.put_u8(*val);
16306        }
16307        __tmp.put_u8(self.gimbal_device_id);
16308        if matches!(version, MavlinkVersion::V2) {
16309            let len = __tmp.len();
16310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16311        } else {
16312            __tmp.len()
16313        }
16314    }
16315}
16316#[doc = "id: 231"]
16317#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
16318#[derive(Debug, Clone, PartialEq)]
16319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16321pub struct WIND_COV_DATA {
16322    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16323    pub time_usec: u64,
16324    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
16325    pub wind_x: f32,
16326    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
16327    pub wind_y: f32,
16328    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
16329    pub wind_z: f32,
16330    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
16331    pub var_horiz: f32,
16332    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
16333    pub var_vert: f32,
16334    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
16335    pub wind_alt: f32,
16336    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
16337    pub horiz_accuracy: f32,
16338    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
16339    pub vert_accuracy: f32,
16340}
16341impl WIND_COV_DATA {
16342    pub const ENCODED_LEN: usize = 40usize;
16343    pub const DEFAULT: Self = Self {
16344        time_usec: 0_u64,
16345        wind_x: 0.0_f32,
16346        wind_y: 0.0_f32,
16347        wind_z: 0.0_f32,
16348        var_horiz: 0.0_f32,
16349        var_vert: 0.0_f32,
16350        wind_alt: 0.0_f32,
16351        horiz_accuracy: 0.0_f32,
16352        vert_accuracy: 0.0_f32,
16353    };
16354    #[cfg(feature = "arbitrary")]
16355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16356        use arbitrary::{Arbitrary, Unstructured};
16357        let mut buf = [0u8; 1024];
16358        rng.fill_bytes(&mut buf);
16359        let mut unstructured = Unstructured::new(&buf);
16360        Self::arbitrary(&mut unstructured).unwrap_or_default()
16361    }
16362}
16363impl Default for WIND_COV_DATA {
16364    fn default() -> Self {
16365        Self::DEFAULT.clone()
16366    }
16367}
16368impl MessageData for WIND_COV_DATA {
16369    type Message = MavMessage;
16370    const ID: u32 = 231u32;
16371    const NAME: &'static str = "WIND_COV";
16372    const EXTRA_CRC: u8 = 105u8;
16373    const ENCODED_LEN: usize = 40usize;
16374    fn deser(
16375        _version: MavlinkVersion,
16376        __input: &[u8],
16377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16378        let avail_len = __input.len();
16379        let mut payload_buf = [0; Self::ENCODED_LEN];
16380        let mut buf = if avail_len < Self::ENCODED_LEN {
16381            payload_buf[0..avail_len].copy_from_slice(__input);
16382            Bytes::new(&payload_buf)
16383        } else {
16384            Bytes::new(__input)
16385        };
16386        let mut __struct = Self::default();
16387        __struct.time_usec = buf.get_u64_le();
16388        __struct.wind_x = buf.get_f32_le();
16389        __struct.wind_y = buf.get_f32_le();
16390        __struct.wind_z = buf.get_f32_le();
16391        __struct.var_horiz = buf.get_f32_le();
16392        __struct.var_vert = buf.get_f32_le();
16393        __struct.wind_alt = buf.get_f32_le();
16394        __struct.horiz_accuracy = buf.get_f32_le();
16395        __struct.vert_accuracy = buf.get_f32_le();
16396        Ok(__struct)
16397    }
16398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16399        let mut __tmp = BytesMut::new(bytes);
16400        #[allow(clippy::absurd_extreme_comparisons)]
16401        #[allow(unused_comparisons)]
16402        if __tmp.remaining() < Self::ENCODED_LEN {
16403            panic!(
16404                "buffer is too small (need {} bytes, but got {})",
16405                Self::ENCODED_LEN,
16406                __tmp.remaining(),
16407            )
16408        }
16409        __tmp.put_u64_le(self.time_usec);
16410        __tmp.put_f32_le(self.wind_x);
16411        __tmp.put_f32_le(self.wind_y);
16412        __tmp.put_f32_le(self.wind_z);
16413        __tmp.put_f32_le(self.var_horiz);
16414        __tmp.put_f32_le(self.var_vert);
16415        __tmp.put_f32_le(self.wind_alt);
16416        __tmp.put_f32_le(self.horiz_accuracy);
16417        __tmp.put_f32_le(self.vert_accuracy);
16418        if matches!(version, MavlinkVersion::V2) {
16419            let len = __tmp.len();
16420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16421        } else {
16422            __tmp.len()
16423        }
16424    }
16425}
16426#[doc = "id: 8008"]
16427#[doc = "Off-board controls/commands for ASLUAVs."]
16428#[derive(Debug, Clone, PartialEq)]
16429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16431pub struct ASL_OBCTRL_DATA {
16432    #[doc = "Time since system start"]
16433    pub timestamp: u64,
16434    #[doc = "Elevator command [~]"]
16435    pub uElev: f32,
16436    #[doc = "Throttle command [~]"]
16437    pub uThrot: f32,
16438    #[doc = "Throttle 2 command [~]"]
16439    pub uThrot2: f32,
16440    #[doc = "Left aileron command [~]"]
16441    pub uAilL: f32,
16442    #[doc = "Right aileron command [~]"]
16443    pub uAilR: f32,
16444    #[doc = "Rudder command [~]"]
16445    pub uRud: f32,
16446    #[doc = "Off-board computer status"]
16447    pub obctrl_status: u8,
16448}
16449impl ASL_OBCTRL_DATA {
16450    pub const ENCODED_LEN: usize = 33usize;
16451    pub const DEFAULT: Self = Self {
16452        timestamp: 0_u64,
16453        uElev: 0.0_f32,
16454        uThrot: 0.0_f32,
16455        uThrot2: 0.0_f32,
16456        uAilL: 0.0_f32,
16457        uAilR: 0.0_f32,
16458        uRud: 0.0_f32,
16459        obctrl_status: 0_u8,
16460    };
16461    #[cfg(feature = "arbitrary")]
16462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16463        use arbitrary::{Arbitrary, Unstructured};
16464        let mut buf = [0u8; 1024];
16465        rng.fill_bytes(&mut buf);
16466        let mut unstructured = Unstructured::new(&buf);
16467        Self::arbitrary(&mut unstructured).unwrap_or_default()
16468    }
16469}
16470impl Default for ASL_OBCTRL_DATA {
16471    fn default() -> Self {
16472        Self::DEFAULT.clone()
16473    }
16474}
16475impl MessageData for ASL_OBCTRL_DATA {
16476    type Message = MavMessage;
16477    const ID: u32 = 8008u32;
16478    const NAME: &'static str = "ASL_OBCTRL";
16479    const EXTRA_CRC: u8 = 234u8;
16480    const ENCODED_LEN: usize = 33usize;
16481    fn deser(
16482        _version: MavlinkVersion,
16483        __input: &[u8],
16484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16485        let avail_len = __input.len();
16486        let mut payload_buf = [0; Self::ENCODED_LEN];
16487        let mut buf = if avail_len < Self::ENCODED_LEN {
16488            payload_buf[0..avail_len].copy_from_slice(__input);
16489            Bytes::new(&payload_buf)
16490        } else {
16491            Bytes::new(__input)
16492        };
16493        let mut __struct = Self::default();
16494        __struct.timestamp = buf.get_u64_le();
16495        __struct.uElev = buf.get_f32_le();
16496        __struct.uThrot = buf.get_f32_le();
16497        __struct.uThrot2 = buf.get_f32_le();
16498        __struct.uAilL = buf.get_f32_le();
16499        __struct.uAilR = buf.get_f32_le();
16500        __struct.uRud = buf.get_f32_le();
16501        __struct.obctrl_status = buf.get_u8();
16502        Ok(__struct)
16503    }
16504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16505        let mut __tmp = BytesMut::new(bytes);
16506        #[allow(clippy::absurd_extreme_comparisons)]
16507        #[allow(unused_comparisons)]
16508        if __tmp.remaining() < Self::ENCODED_LEN {
16509            panic!(
16510                "buffer is too small (need {} bytes, but got {})",
16511                Self::ENCODED_LEN,
16512                __tmp.remaining(),
16513            )
16514        }
16515        __tmp.put_u64_le(self.timestamp);
16516        __tmp.put_f32_le(self.uElev);
16517        __tmp.put_f32_le(self.uThrot);
16518        __tmp.put_f32_le(self.uThrot2);
16519        __tmp.put_f32_le(self.uAilL);
16520        __tmp.put_f32_le(self.uAilR);
16521        __tmp.put_f32_le(self.uRud);
16522        __tmp.put_u8(self.obctrl_status);
16523        if matches!(version, MavlinkVersion::V2) {
16524            let len = __tmp.len();
16525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16526        } else {
16527            __tmp.len()
16528        }
16529    }
16530}
16531#[doc = "id: 271"]
16532#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
16533#[derive(Debug, Clone, PartialEq)]
16534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16536pub struct CAMERA_FOV_STATUS_DATA {
16537    #[doc = "Timestamp (time since system boot)."]
16538    pub time_boot_ms: u32,
16539    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
16540    pub lat_camera: i32,
16541    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
16542    pub lon_camera: i32,
16543    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
16544    pub alt_camera: i32,
16545    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16546    pub lat_image: i32,
16547    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16548    pub lon_image: i32,
16549    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
16550    pub alt_image: i32,
16551    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16553    pub q: [f32; 4],
16554    #[doc = "Horizontal field of view (NaN if unknown)."]
16555    pub hfov: f32,
16556    #[doc = "Vertical field of view (NaN if unknown)."]
16557    pub vfov: f32,
16558    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
16559    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16560    pub camera_device_id: u8,
16561}
16562impl CAMERA_FOV_STATUS_DATA {
16563    pub const ENCODED_LEN: usize = 53usize;
16564    pub const DEFAULT: Self = Self {
16565        time_boot_ms: 0_u32,
16566        lat_camera: 0_i32,
16567        lon_camera: 0_i32,
16568        alt_camera: 0_i32,
16569        lat_image: 0_i32,
16570        lon_image: 0_i32,
16571        alt_image: 0_i32,
16572        q: [0.0_f32; 4usize],
16573        hfov: 0.0_f32,
16574        vfov: 0.0_f32,
16575        camera_device_id: 0_u8,
16576    };
16577    #[cfg(feature = "arbitrary")]
16578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16579        use arbitrary::{Arbitrary, Unstructured};
16580        let mut buf = [0u8; 1024];
16581        rng.fill_bytes(&mut buf);
16582        let mut unstructured = Unstructured::new(&buf);
16583        Self::arbitrary(&mut unstructured).unwrap_or_default()
16584    }
16585}
16586impl Default for CAMERA_FOV_STATUS_DATA {
16587    fn default() -> Self {
16588        Self::DEFAULT.clone()
16589    }
16590}
16591impl MessageData for CAMERA_FOV_STATUS_DATA {
16592    type Message = MavMessage;
16593    const ID: u32 = 271u32;
16594    const NAME: &'static str = "CAMERA_FOV_STATUS";
16595    const EXTRA_CRC: u8 = 22u8;
16596    const ENCODED_LEN: usize = 53usize;
16597    fn deser(
16598        _version: MavlinkVersion,
16599        __input: &[u8],
16600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16601        let avail_len = __input.len();
16602        let mut payload_buf = [0; Self::ENCODED_LEN];
16603        let mut buf = if avail_len < Self::ENCODED_LEN {
16604            payload_buf[0..avail_len].copy_from_slice(__input);
16605            Bytes::new(&payload_buf)
16606        } else {
16607            Bytes::new(__input)
16608        };
16609        let mut __struct = Self::default();
16610        __struct.time_boot_ms = buf.get_u32_le();
16611        __struct.lat_camera = buf.get_i32_le();
16612        __struct.lon_camera = buf.get_i32_le();
16613        __struct.alt_camera = buf.get_i32_le();
16614        __struct.lat_image = buf.get_i32_le();
16615        __struct.lon_image = buf.get_i32_le();
16616        __struct.alt_image = buf.get_i32_le();
16617        for v in &mut __struct.q {
16618            let val = buf.get_f32_le();
16619            *v = val;
16620        }
16621        __struct.hfov = buf.get_f32_le();
16622        __struct.vfov = buf.get_f32_le();
16623        __struct.camera_device_id = buf.get_u8();
16624        Ok(__struct)
16625    }
16626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16627        let mut __tmp = BytesMut::new(bytes);
16628        #[allow(clippy::absurd_extreme_comparisons)]
16629        #[allow(unused_comparisons)]
16630        if __tmp.remaining() < Self::ENCODED_LEN {
16631            panic!(
16632                "buffer is too small (need {} bytes, but got {})",
16633                Self::ENCODED_LEN,
16634                __tmp.remaining(),
16635            )
16636        }
16637        __tmp.put_u32_le(self.time_boot_ms);
16638        __tmp.put_i32_le(self.lat_camera);
16639        __tmp.put_i32_le(self.lon_camera);
16640        __tmp.put_i32_le(self.alt_camera);
16641        __tmp.put_i32_le(self.lat_image);
16642        __tmp.put_i32_le(self.lon_image);
16643        __tmp.put_i32_le(self.alt_image);
16644        for val in &self.q {
16645            __tmp.put_f32_le(*val);
16646        }
16647        __tmp.put_f32_le(self.hfov);
16648        __tmp.put_f32_le(self.vfov);
16649        __tmp.put_u8(self.camera_device_id);
16650        if matches!(version, MavlinkVersion::V2) {
16651            let len = __tmp.len();
16652            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16653        } else {
16654            __tmp.len()
16655        }
16656    }
16657}
16658#[doc = "id: 146"]
16659#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
16660#[derive(Debug, Clone, PartialEq)]
16661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16663pub struct CONTROL_SYSTEM_STATE_DATA {
16664    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16665    pub time_usec: u64,
16666    #[doc = "X acceleration in body frame"]
16667    pub x_acc: f32,
16668    #[doc = "Y acceleration in body frame"]
16669    pub y_acc: f32,
16670    #[doc = "Z acceleration in body frame"]
16671    pub z_acc: f32,
16672    #[doc = "X velocity in body frame"]
16673    pub x_vel: f32,
16674    #[doc = "Y velocity in body frame"]
16675    pub y_vel: f32,
16676    #[doc = "Z velocity in body frame"]
16677    pub z_vel: f32,
16678    #[doc = "X position in local frame"]
16679    pub x_pos: f32,
16680    #[doc = "Y position in local frame"]
16681    pub y_pos: f32,
16682    #[doc = "Z position in local frame"]
16683    pub z_pos: f32,
16684    #[doc = "Airspeed, set to -1 if unknown"]
16685    pub airspeed: f32,
16686    #[doc = "Variance of body velocity estimate"]
16687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16688    pub vel_variance: [f32; 3],
16689    #[doc = "Variance in local position"]
16690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16691    pub pos_variance: [f32; 3],
16692    #[doc = "The attitude, represented as Quaternion"]
16693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16694    pub q: [f32; 4],
16695    #[doc = "Angular rate in roll axis"]
16696    pub roll_rate: f32,
16697    #[doc = "Angular rate in pitch axis"]
16698    pub pitch_rate: f32,
16699    #[doc = "Angular rate in yaw axis"]
16700    pub yaw_rate: f32,
16701}
16702impl CONTROL_SYSTEM_STATE_DATA {
16703    pub const ENCODED_LEN: usize = 100usize;
16704    pub const DEFAULT: Self = Self {
16705        time_usec: 0_u64,
16706        x_acc: 0.0_f32,
16707        y_acc: 0.0_f32,
16708        z_acc: 0.0_f32,
16709        x_vel: 0.0_f32,
16710        y_vel: 0.0_f32,
16711        z_vel: 0.0_f32,
16712        x_pos: 0.0_f32,
16713        y_pos: 0.0_f32,
16714        z_pos: 0.0_f32,
16715        airspeed: 0.0_f32,
16716        vel_variance: [0.0_f32; 3usize],
16717        pos_variance: [0.0_f32; 3usize],
16718        q: [0.0_f32; 4usize],
16719        roll_rate: 0.0_f32,
16720        pitch_rate: 0.0_f32,
16721        yaw_rate: 0.0_f32,
16722    };
16723    #[cfg(feature = "arbitrary")]
16724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16725        use arbitrary::{Arbitrary, Unstructured};
16726        let mut buf = [0u8; 1024];
16727        rng.fill_bytes(&mut buf);
16728        let mut unstructured = Unstructured::new(&buf);
16729        Self::arbitrary(&mut unstructured).unwrap_or_default()
16730    }
16731}
16732impl Default for CONTROL_SYSTEM_STATE_DATA {
16733    fn default() -> Self {
16734        Self::DEFAULT.clone()
16735    }
16736}
16737impl MessageData for CONTROL_SYSTEM_STATE_DATA {
16738    type Message = MavMessage;
16739    const ID: u32 = 146u32;
16740    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
16741    const EXTRA_CRC: u8 = 103u8;
16742    const ENCODED_LEN: usize = 100usize;
16743    fn deser(
16744        _version: MavlinkVersion,
16745        __input: &[u8],
16746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16747        let avail_len = __input.len();
16748        let mut payload_buf = [0; Self::ENCODED_LEN];
16749        let mut buf = if avail_len < Self::ENCODED_LEN {
16750            payload_buf[0..avail_len].copy_from_slice(__input);
16751            Bytes::new(&payload_buf)
16752        } else {
16753            Bytes::new(__input)
16754        };
16755        let mut __struct = Self::default();
16756        __struct.time_usec = buf.get_u64_le();
16757        __struct.x_acc = buf.get_f32_le();
16758        __struct.y_acc = buf.get_f32_le();
16759        __struct.z_acc = buf.get_f32_le();
16760        __struct.x_vel = buf.get_f32_le();
16761        __struct.y_vel = buf.get_f32_le();
16762        __struct.z_vel = buf.get_f32_le();
16763        __struct.x_pos = buf.get_f32_le();
16764        __struct.y_pos = buf.get_f32_le();
16765        __struct.z_pos = buf.get_f32_le();
16766        __struct.airspeed = buf.get_f32_le();
16767        for v in &mut __struct.vel_variance {
16768            let val = buf.get_f32_le();
16769            *v = val;
16770        }
16771        for v in &mut __struct.pos_variance {
16772            let val = buf.get_f32_le();
16773            *v = val;
16774        }
16775        for v in &mut __struct.q {
16776            let val = buf.get_f32_le();
16777            *v = val;
16778        }
16779        __struct.roll_rate = buf.get_f32_le();
16780        __struct.pitch_rate = buf.get_f32_le();
16781        __struct.yaw_rate = buf.get_f32_le();
16782        Ok(__struct)
16783    }
16784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16785        let mut __tmp = BytesMut::new(bytes);
16786        #[allow(clippy::absurd_extreme_comparisons)]
16787        #[allow(unused_comparisons)]
16788        if __tmp.remaining() < Self::ENCODED_LEN {
16789            panic!(
16790                "buffer is too small (need {} bytes, but got {})",
16791                Self::ENCODED_LEN,
16792                __tmp.remaining(),
16793            )
16794        }
16795        __tmp.put_u64_le(self.time_usec);
16796        __tmp.put_f32_le(self.x_acc);
16797        __tmp.put_f32_le(self.y_acc);
16798        __tmp.put_f32_le(self.z_acc);
16799        __tmp.put_f32_le(self.x_vel);
16800        __tmp.put_f32_le(self.y_vel);
16801        __tmp.put_f32_le(self.z_vel);
16802        __tmp.put_f32_le(self.x_pos);
16803        __tmp.put_f32_le(self.y_pos);
16804        __tmp.put_f32_le(self.z_pos);
16805        __tmp.put_f32_le(self.airspeed);
16806        for val in &self.vel_variance {
16807            __tmp.put_f32_le(*val);
16808        }
16809        for val in &self.pos_variance {
16810            __tmp.put_f32_le(*val);
16811        }
16812        for val in &self.q {
16813            __tmp.put_f32_le(*val);
16814        }
16815        __tmp.put_f32_le(self.roll_rate);
16816        __tmp.put_f32_le(self.pitch_rate);
16817        __tmp.put_f32_le(self.yaw_rate);
16818        if matches!(version, MavlinkVersion::V2) {
16819            let len = __tmp.len();
16820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16821        } else {
16822            __tmp.len()
16823        }
16824    }
16825}
16826#[doc = "id: 321"]
16827#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
16828#[derive(Debug, Clone, PartialEq)]
16829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16831pub struct PARAM_EXT_REQUEST_LIST_DATA {
16832    #[doc = "System ID"]
16833    pub target_system: u8,
16834    #[doc = "Component ID"]
16835    pub target_component: u8,
16836}
16837impl PARAM_EXT_REQUEST_LIST_DATA {
16838    pub const ENCODED_LEN: usize = 2usize;
16839    pub const DEFAULT: Self = Self {
16840        target_system: 0_u8,
16841        target_component: 0_u8,
16842    };
16843    #[cfg(feature = "arbitrary")]
16844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16845        use arbitrary::{Arbitrary, Unstructured};
16846        let mut buf = [0u8; 1024];
16847        rng.fill_bytes(&mut buf);
16848        let mut unstructured = Unstructured::new(&buf);
16849        Self::arbitrary(&mut unstructured).unwrap_or_default()
16850    }
16851}
16852impl Default for PARAM_EXT_REQUEST_LIST_DATA {
16853    fn default() -> Self {
16854        Self::DEFAULT.clone()
16855    }
16856}
16857impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
16858    type Message = MavMessage;
16859    const ID: u32 = 321u32;
16860    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
16861    const EXTRA_CRC: u8 = 88u8;
16862    const ENCODED_LEN: usize = 2usize;
16863    fn deser(
16864        _version: MavlinkVersion,
16865        __input: &[u8],
16866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16867        let avail_len = __input.len();
16868        let mut payload_buf = [0; Self::ENCODED_LEN];
16869        let mut buf = if avail_len < Self::ENCODED_LEN {
16870            payload_buf[0..avail_len].copy_from_slice(__input);
16871            Bytes::new(&payload_buf)
16872        } else {
16873            Bytes::new(__input)
16874        };
16875        let mut __struct = Self::default();
16876        __struct.target_system = buf.get_u8();
16877        __struct.target_component = buf.get_u8();
16878        Ok(__struct)
16879    }
16880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16881        let mut __tmp = BytesMut::new(bytes);
16882        #[allow(clippy::absurd_extreme_comparisons)]
16883        #[allow(unused_comparisons)]
16884        if __tmp.remaining() < Self::ENCODED_LEN {
16885            panic!(
16886                "buffer is too small (need {} bytes, but got {})",
16887                Self::ENCODED_LEN,
16888                __tmp.remaining(),
16889            )
16890        }
16891        __tmp.put_u8(self.target_system);
16892        __tmp.put_u8(self.target_component);
16893        if matches!(version, MavlinkVersion::V2) {
16894            let len = __tmp.len();
16895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16896        } else {
16897            __tmp.len()
16898        }
16899    }
16900}
16901#[doc = "id: 12918"]
16902#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
16903#[derive(Debug, Clone, PartialEq)]
16904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16906pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
16907    #[doc = "Status level indicating if arming is allowed."]
16908    pub status: MavOdidArmStatus,
16909    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
16910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16911    pub error: [u8; 50],
16912}
16913impl OPEN_DRONE_ID_ARM_STATUS_DATA {
16914    pub const ENCODED_LEN: usize = 51usize;
16915    pub const DEFAULT: Self = Self {
16916        status: MavOdidArmStatus::DEFAULT,
16917        error: [0_u8; 50usize],
16918    };
16919    #[cfg(feature = "arbitrary")]
16920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16921        use arbitrary::{Arbitrary, Unstructured};
16922        let mut buf = [0u8; 1024];
16923        rng.fill_bytes(&mut buf);
16924        let mut unstructured = Unstructured::new(&buf);
16925        Self::arbitrary(&mut unstructured).unwrap_or_default()
16926    }
16927}
16928impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
16929    fn default() -> Self {
16930        Self::DEFAULT.clone()
16931    }
16932}
16933impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
16934    type Message = MavMessage;
16935    const ID: u32 = 12918u32;
16936    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
16937    const EXTRA_CRC: u8 = 139u8;
16938    const ENCODED_LEN: usize = 51usize;
16939    fn deser(
16940        _version: MavlinkVersion,
16941        __input: &[u8],
16942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16943        let avail_len = __input.len();
16944        let mut payload_buf = [0; Self::ENCODED_LEN];
16945        let mut buf = if avail_len < Self::ENCODED_LEN {
16946            payload_buf[0..avail_len].copy_from_slice(__input);
16947            Bytes::new(&payload_buf)
16948        } else {
16949            Bytes::new(__input)
16950        };
16951        let mut __struct = Self::default();
16952        let tmp = buf.get_u8();
16953        __struct.status =
16954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16955                enum_type: "MavOdidArmStatus",
16956                value: tmp as u32,
16957            })?;
16958        for v in &mut __struct.error {
16959            let val = buf.get_u8();
16960            *v = val;
16961        }
16962        Ok(__struct)
16963    }
16964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16965        let mut __tmp = BytesMut::new(bytes);
16966        #[allow(clippy::absurd_extreme_comparisons)]
16967        #[allow(unused_comparisons)]
16968        if __tmp.remaining() < Self::ENCODED_LEN {
16969            panic!(
16970                "buffer is too small (need {} bytes, but got {})",
16971                Self::ENCODED_LEN,
16972                __tmp.remaining(),
16973            )
16974        }
16975        __tmp.put_u8(self.status as u8);
16976        for val in &self.error {
16977            __tmp.put_u8(*val);
16978        }
16979        if matches!(version, MavlinkVersion::V2) {
16980            let len = __tmp.len();
16981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16982        } else {
16983            __tmp.len()
16984        }
16985    }
16986}
16987#[doc = "id: 55"]
16988#[doc = "Read out the safety zone the MAV currently assumes."]
16989#[derive(Debug, Clone, PartialEq)]
16990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16992pub struct SAFETY_ALLOWED_AREA_DATA {
16993    #[doc = "x position 1 / Latitude 1"]
16994    pub p1x: f32,
16995    #[doc = "y position 1 / Longitude 1"]
16996    pub p1y: f32,
16997    #[doc = "z position 1 / Altitude 1"]
16998    pub p1z: f32,
16999    #[doc = "x position 2 / Latitude 2"]
17000    pub p2x: f32,
17001    #[doc = "y position 2 / Longitude 2"]
17002    pub p2y: f32,
17003    #[doc = "z position 2 / Altitude 2"]
17004    pub p2z: f32,
17005    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
17006    pub frame: MavFrame,
17007}
17008impl SAFETY_ALLOWED_AREA_DATA {
17009    pub const ENCODED_LEN: usize = 25usize;
17010    pub const DEFAULT: Self = Self {
17011        p1x: 0.0_f32,
17012        p1y: 0.0_f32,
17013        p1z: 0.0_f32,
17014        p2x: 0.0_f32,
17015        p2y: 0.0_f32,
17016        p2z: 0.0_f32,
17017        frame: MavFrame::DEFAULT,
17018    };
17019    #[cfg(feature = "arbitrary")]
17020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17021        use arbitrary::{Arbitrary, Unstructured};
17022        let mut buf = [0u8; 1024];
17023        rng.fill_bytes(&mut buf);
17024        let mut unstructured = Unstructured::new(&buf);
17025        Self::arbitrary(&mut unstructured).unwrap_or_default()
17026    }
17027}
17028impl Default for SAFETY_ALLOWED_AREA_DATA {
17029    fn default() -> Self {
17030        Self::DEFAULT.clone()
17031    }
17032}
17033impl MessageData for SAFETY_ALLOWED_AREA_DATA {
17034    type Message = MavMessage;
17035    const ID: u32 = 55u32;
17036    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
17037    const EXTRA_CRC: u8 = 3u8;
17038    const ENCODED_LEN: usize = 25usize;
17039    fn deser(
17040        _version: MavlinkVersion,
17041        __input: &[u8],
17042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17043        let avail_len = __input.len();
17044        let mut payload_buf = [0; Self::ENCODED_LEN];
17045        let mut buf = if avail_len < Self::ENCODED_LEN {
17046            payload_buf[0..avail_len].copy_from_slice(__input);
17047            Bytes::new(&payload_buf)
17048        } else {
17049            Bytes::new(__input)
17050        };
17051        let mut __struct = Self::default();
17052        __struct.p1x = buf.get_f32_le();
17053        __struct.p1y = buf.get_f32_le();
17054        __struct.p1z = buf.get_f32_le();
17055        __struct.p2x = buf.get_f32_le();
17056        __struct.p2y = buf.get_f32_le();
17057        __struct.p2z = buf.get_f32_le();
17058        let tmp = buf.get_u8();
17059        __struct.frame =
17060            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17061                enum_type: "MavFrame",
17062                value: tmp as u32,
17063            })?;
17064        Ok(__struct)
17065    }
17066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17067        let mut __tmp = BytesMut::new(bytes);
17068        #[allow(clippy::absurd_extreme_comparisons)]
17069        #[allow(unused_comparisons)]
17070        if __tmp.remaining() < Self::ENCODED_LEN {
17071            panic!(
17072                "buffer is too small (need {} bytes, but got {})",
17073                Self::ENCODED_LEN,
17074                __tmp.remaining(),
17075            )
17076        }
17077        __tmp.put_f32_le(self.p1x);
17078        __tmp.put_f32_le(self.p1y);
17079        __tmp.put_f32_le(self.p1z);
17080        __tmp.put_f32_le(self.p2x);
17081        __tmp.put_f32_le(self.p2y);
17082        __tmp.put_f32_le(self.p2z);
17083        __tmp.put_u8(self.frame as u8);
17084        if matches!(version, MavlinkVersion::V2) {
17085            let len = __tmp.len();
17086            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17087        } else {
17088            __tmp.len()
17089        }
17090    }
17091}
17092#[doc = "id: 288"]
17093#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
17094#[derive(Debug, Clone, PartialEq)]
17095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17097pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
17098    #[doc = "High level gimbal manager flags."]
17099    pub flags: GimbalManagerFlags,
17100    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
17101    pub pitch: f32,
17102    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
17103    pub yaw: f32,
17104    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
17105    pub pitch_rate: f32,
17106    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
17107    pub yaw_rate: f32,
17108    #[doc = "System ID"]
17109    pub target_system: u8,
17110    #[doc = "Component ID"]
17111    pub target_component: u8,
17112    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
17113    pub gimbal_device_id: u8,
17114}
17115impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
17116    pub const ENCODED_LEN: usize = 23usize;
17117    pub const DEFAULT: Self = Self {
17118        flags: GimbalManagerFlags::DEFAULT,
17119        pitch: 0.0_f32,
17120        yaw: 0.0_f32,
17121        pitch_rate: 0.0_f32,
17122        yaw_rate: 0.0_f32,
17123        target_system: 0_u8,
17124        target_component: 0_u8,
17125        gimbal_device_id: 0_u8,
17126    };
17127    #[cfg(feature = "arbitrary")]
17128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17129        use arbitrary::{Arbitrary, Unstructured};
17130        let mut buf = [0u8; 1024];
17131        rng.fill_bytes(&mut buf);
17132        let mut unstructured = Unstructured::new(&buf);
17133        Self::arbitrary(&mut unstructured).unwrap_or_default()
17134    }
17135}
17136impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
17137    fn default() -> Self {
17138        Self::DEFAULT.clone()
17139    }
17140}
17141impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
17142    type Message = MavMessage;
17143    const ID: u32 = 288u32;
17144    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
17145    const EXTRA_CRC: u8 = 20u8;
17146    const ENCODED_LEN: usize = 23usize;
17147    fn deser(
17148        _version: MavlinkVersion,
17149        __input: &[u8],
17150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17151        let avail_len = __input.len();
17152        let mut payload_buf = [0; Self::ENCODED_LEN];
17153        let mut buf = if avail_len < Self::ENCODED_LEN {
17154            payload_buf[0..avail_len].copy_from_slice(__input);
17155            Bytes::new(&payload_buf)
17156        } else {
17157            Bytes::new(__input)
17158        };
17159        let mut __struct = Self::default();
17160        let tmp = buf.get_u32_le();
17161        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
17162            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17163                flag_type: "GimbalManagerFlags",
17164                value: tmp as u32,
17165            })?;
17166        __struct.pitch = buf.get_f32_le();
17167        __struct.yaw = buf.get_f32_le();
17168        __struct.pitch_rate = buf.get_f32_le();
17169        __struct.yaw_rate = buf.get_f32_le();
17170        __struct.target_system = buf.get_u8();
17171        __struct.target_component = buf.get_u8();
17172        __struct.gimbal_device_id = buf.get_u8();
17173        Ok(__struct)
17174    }
17175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17176        let mut __tmp = BytesMut::new(bytes);
17177        #[allow(clippy::absurd_extreme_comparisons)]
17178        #[allow(unused_comparisons)]
17179        if __tmp.remaining() < Self::ENCODED_LEN {
17180            panic!(
17181                "buffer is too small (need {} bytes, but got {})",
17182                Self::ENCODED_LEN,
17183                __tmp.remaining(),
17184            )
17185        }
17186        __tmp.put_u32_le(self.flags.bits());
17187        __tmp.put_f32_le(self.pitch);
17188        __tmp.put_f32_le(self.yaw);
17189        __tmp.put_f32_le(self.pitch_rate);
17190        __tmp.put_f32_le(self.yaw_rate);
17191        __tmp.put_u8(self.target_system);
17192        __tmp.put_u8(self.target_component);
17193        __tmp.put_u8(self.gimbal_device_id);
17194        if matches!(version, MavlinkVersion::V2) {
17195            let len = __tmp.len();
17196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17197        } else {
17198            __tmp.len()
17199        }
17200    }
17201}
17202#[doc = "id: 28"]
17203#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
17204#[derive(Debug, Clone, PartialEq)]
17205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17207pub struct RAW_PRESSURE_DATA {
17208    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17209    pub time_usec: u64,
17210    #[doc = "Absolute pressure (raw)"]
17211    pub press_abs: i16,
17212    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
17213    pub press_diff1: i16,
17214    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
17215    pub press_diff2: i16,
17216    #[doc = "Raw Temperature measurement (raw)"]
17217    pub temperature: i16,
17218}
17219impl RAW_PRESSURE_DATA {
17220    pub const ENCODED_LEN: usize = 16usize;
17221    pub const DEFAULT: Self = Self {
17222        time_usec: 0_u64,
17223        press_abs: 0_i16,
17224        press_diff1: 0_i16,
17225        press_diff2: 0_i16,
17226        temperature: 0_i16,
17227    };
17228    #[cfg(feature = "arbitrary")]
17229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17230        use arbitrary::{Arbitrary, Unstructured};
17231        let mut buf = [0u8; 1024];
17232        rng.fill_bytes(&mut buf);
17233        let mut unstructured = Unstructured::new(&buf);
17234        Self::arbitrary(&mut unstructured).unwrap_or_default()
17235    }
17236}
17237impl Default for RAW_PRESSURE_DATA {
17238    fn default() -> Self {
17239        Self::DEFAULT.clone()
17240    }
17241}
17242impl MessageData for RAW_PRESSURE_DATA {
17243    type Message = MavMessage;
17244    const ID: u32 = 28u32;
17245    const NAME: &'static str = "RAW_PRESSURE";
17246    const EXTRA_CRC: u8 = 67u8;
17247    const ENCODED_LEN: usize = 16usize;
17248    fn deser(
17249        _version: MavlinkVersion,
17250        __input: &[u8],
17251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17252        let avail_len = __input.len();
17253        let mut payload_buf = [0; Self::ENCODED_LEN];
17254        let mut buf = if avail_len < Self::ENCODED_LEN {
17255            payload_buf[0..avail_len].copy_from_slice(__input);
17256            Bytes::new(&payload_buf)
17257        } else {
17258            Bytes::new(__input)
17259        };
17260        let mut __struct = Self::default();
17261        __struct.time_usec = buf.get_u64_le();
17262        __struct.press_abs = buf.get_i16_le();
17263        __struct.press_diff1 = buf.get_i16_le();
17264        __struct.press_diff2 = buf.get_i16_le();
17265        __struct.temperature = buf.get_i16_le();
17266        Ok(__struct)
17267    }
17268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17269        let mut __tmp = BytesMut::new(bytes);
17270        #[allow(clippy::absurd_extreme_comparisons)]
17271        #[allow(unused_comparisons)]
17272        if __tmp.remaining() < Self::ENCODED_LEN {
17273            panic!(
17274                "buffer is too small (need {} bytes, but got {})",
17275                Self::ENCODED_LEN,
17276                __tmp.remaining(),
17277            )
17278        }
17279        __tmp.put_u64_le(self.time_usec);
17280        __tmp.put_i16_le(self.press_abs);
17281        __tmp.put_i16_le(self.press_diff1);
17282        __tmp.put_i16_le(self.press_diff2);
17283        __tmp.put_i16_le(self.temperature);
17284        if matches!(version, MavlinkVersion::V2) {
17285            let len = __tmp.len();
17286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17287        } else {
17288            __tmp.len()
17289        }
17290    }
17291}
17292#[doc = "id: 121"]
17293#[doc = "Erase all logs."]
17294#[derive(Debug, Clone, PartialEq)]
17295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17297pub struct LOG_ERASE_DATA {
17298    #[doc = "System ID"]
17299    pub target_system: u8,
17300    #[doc = "Component ID"]
17301    pub target_component: u8,
17302}
17303impl LOG_ERASE_DATA {
17304    pub const ENCODED_LEN: usize = 2usize;
17305    pub const DEFAULT: Self = Self {
17306        target_system: 0_u8,
17307        target_component: 0_u8,
17308    };
17309    #[cfg(feature = "arbitrary")]
17310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17311        use arbitrary::{Arbitrary, Unstructured};
17312        let mut buf = [0u8; 1024];
17313        rng.fill_bytes(&mut buf);
17314        let mut unstructured = Unstructured::new(&buf);
17315        Self::arbitrary(&mut unstructured).unwrap_or_default()
17316    }
17317}
17318impl Default for LOG_ERASE_DATA {
17319    fn default() -> Self {
17320        Self::DEFAULT.clone()
17321    }
17322}
17323impl MessageData for LOG_ERASE_DATA {
17324    type Message = MavMessage;
17325    const ID: u32 = 121u32;
17326    const NAME: &'static str = "LOG_ERASE";
17327    const EXTRA_CRC: u8 = 237u8;
17328    const ENCODED_LEN: usize = 2usize;
17329    fn deser(
17330        _version: MavlinkVersion,
17331        __input: &[u8],
17332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17333        let avail_len = __input.len();
17334        let mut payload_buf = [0; Self::ENCODED_LEN];
17335        let mut buf = if avail_len < Self::ENCODED_LEN {
17336            payload_buf[0..avail_len].copy_from_slice(__input);
17337            Bytes::new(&payload_buf)
17338        } else {
17339            Bytes::new(__input)
17340        };
17341        let mut __struct = Self::default();
17342        __struct.target_system = buf.get_u8();
17343        __struct.target_component = buf.get_u8();
17344        Ok(__struct)
17345    }
17346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17347        let mut __tmp = BytesMut::new(bytes);
17348        #[allow(clippy::absurd_extreme_comparisons)]
17349        #[allow(unused_comparisons)]
17350        if __tmp.remaining() < Self::ENCODED_LEN {
17351            panic!(
17352                "buffer is too small (need {} bytes, but got {})",
17353                Self::ENCODED_LEN,
17354                __tmp.remaining(),
17355            )
17356        }
17357        __tmp.put_u8(self.target_system);
17358        __tmp.put_u8(self.target_component);
17359        if matches!(version, MavlinkVersion::V2) {
17360            let len = __tmp.len();
17361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17362        } else {
17363            __tmp.len()
17364        }
17365    }
17366}
17367#[doc = "id: 139"]
17368#[doc = "Set the vehicle attitude and body angular rates."]
17369#[derive(Debug, Clone, PartialEq)]
17370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17372pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
17373    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17374    pub time_usec: u64,
17375    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
17376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17377    pub controls: [f32; 8],
17378    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
17379    pub group_mlx: u8,
17380    #[doc = "System ID"]
17381    pub target_system: u8,
17382    #[doc = "Component ID"]
17383    pub target_component: u8,
17384}
17385impl SET_ACTUATOR_CONTROL_TARGET_DATA {
17386    pub const ENCODED_LEN: usize = 43usize;
17387    pub const DEFAULT: Self = Self {
17388        time_usec: 0_u64,
17389        controls: [0.0_f32; 8usize],
17390        group_mlx: 0_u8,
17391        target_system: 0_u8,
17392        target_component: 0_u8,
17393    };
17394    #[cfg(feature = "arbitrary")]
17395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17396        use arbitrary::{Arbitrary, Unstructured};
17397        let mut buf = [0u8; 1024];
17398        rng.fill_bytes(&mut buf);
17399        let mut unstructured = Unstructured::new(&buf);
17400        Self::arbitrary(&mut unstructured).unwrap_or_default()
17401    }
17402}
17403impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
17404    fn default() -> Self {
17405        Self::DEFAULT.clone()
17406    }
17407}
17408impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
17409    type Message = MavMessage;
17410    const ID: u32 = 139u32;
17411    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
17412    const EXTRA_CRC: u8 = 168u8;
17413    const ENCODED_LEN: usize = 43usize;
17414    fn deser(
17415        _version: MavlinkVersion,
17416        __input: &[u8],
17417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17418        let avail_len = __input.len();
17419        let mut payload_buf = [0; Self::ENCODED_LEN];
17420        let mut buf = if avail_len < Self::ENCODED_LEN {
17421            payload_buf[0..avail_len].copy_from_slice(__input);
17422            Bytes::new(&payload_buf)
17423        } else {
17424            Bytes::new(__input)
17425        };
17426        let mut __struct = Self::default();
17427        __struct.time_usec = buf.get_u64_le();
17428        for v in &mut __struct.controls {
17429            let val = buf.get_f32_le();
17430            *v = val;
17431        }
17432        __struct.group_mlx = buf.get_u8();
17433        __struct.target_system = buf.get_u8();
17434        __struct.target_component = buf.get_u8();
17435        Ok(__struct)
17436    }
17437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17438        let mut __tmp = BytesMut::new(bytes);
17439        #[allow(clippy::absurd_extreme_comparisons)]
17440        #[allow(unused_comparisons)]
17441        if __tmp.remaining() < Self::ENCODED_LEN {
17442            panic!(
17443                "buffer is too small (need {} bytes, but got {})",
17444                Self::ENCODED_LEN,
17445                __tmp.remaining(),
17446            )
17447        }
17448        __tmp.put_u64_le(self.time_usec);
17449        for val in &self.controls {
17450            __tmp.put_f32_le(*val);
17451        }
17452        __tmp.put_u8(self.group_mlx);
17453        __tmp.put_u8(self.target_system);
17454        __tmp.put_u8(self.target_component);
17455        if matches!(version, MavlinkVersion::V2) {
17456            let len = __tmp.len();
17457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17458        } else {
17459            __tmp.len()
17460        }
17461    }
17462}
17463#[doc = "id: 101"]
17464#[doc = "Global position/attitude estimate from a vision source."]
17465#[derive(Debug, Clone, PartialEq)]
17466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17468pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
17469    #[doc = "Timestamp (UNIX time or since system boot)"]
17470    pub usec: u64,
17471    #[doc = "Global X position"]
17472    pub x: f32,
17473    #[doc = "Global Y position"]
17474    pub y: f32,
17475    #[doc = "Global Z position"]
17476    pub z: f32,
17477    #[doc = "Roll angle"]
17478    pub roll: f32,
17479    #[doc = "Pitch angle"]
17480    pub pitch: f32,
17481    #[doc = "Yaw angle"]
17482    pub yaw: f32,
17483    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
17484    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17486    pub covariance: [f32; 21],
17487    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
17488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17489    pub reset_counter: u8,
17490}
17491impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
17492    pub const ENCODED_LEN: usize = 117usize;
17493    pub const DEFAULT: Self = Self {
17494        usec: 0_u64,
17495        x: 0.0_f32,
17496        y: 0.0_f32,
17497        z: 0.0_f32,
17498        roll: 0.0_f32,
17499        pitch: 0.0_f32,
17500        yaw: 0.0_f32,
17501        covariance: [0.0_f32; 21usize],
17502        reset_counter: 0_u8,
17503    };
17504    #[cfg(feature = "arbitrary")]
17505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17506        use arbitrary::{Arbitrary, Unstructured};
17507        let mut buf = [0u8; 1024];
17508        rng.fill_bytes(&mut buf);
17509        let mut unstructured = Unstructured::new(&buf);
17510        Self::arbitrary(&mut unstructured).unwrap_or_default()
17511    }
17512}
17513impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
17514    fn default() -> Self {
17515        Self::DEFAULT.clone()
17516    }
17517}
17518impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
17519    type Message = MavMessage;
17520    const ID: u32 = 101u32;
17521    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
17522    const EXTRA_CRC: u8 = 102u8;
17523    const ENCODED_LEN: usize = 117usize;
17524    fn deser(
17525        _version: MavlinkVersion,
17526        __input: &[u8],
17527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17528        let avail_len = __input.len();
17529        let mut payload_buf = [0; Self::ENCODED_LEN];
17530        let mut buf = if avail_len < Self::ENCODED_LEN {
17531            payload_buf[0..avail_len].copy_from_slice(__input);
17532            Bytes::new(&payload_buf)
17533        } else {
17534            Bytes::new(__input)
17535        };
17536        let mut __struct = Self::default();
17537        __struct.usec = buf.get_u64_le();
17538        __struct.x = buf.get_f32_le();
17539        __struct.y = buf.get_f32_le();
17540        __struct.z = buf.get_f32_le();
17541        __struct.roll = buf.get_f32_le();
17542        __struct.pitch = buf.get_f32_le();
17543        __struct.yaw = buf.get_f32_le();
17544        for v in &mut __struct.covariance {
17545            let val = buf.get_f32_le();
17546            *v = val;
17547        }
17548        __struct.reset_counter = buf.get_u8();
17549        Ok(__struct)
17550    }
17551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17552        let mut __tmp = BytesMut::new(bytes);
17553        #[allow(clippy::absurd_extreme_comparisons)]
17554        #[allow(unused_comparisons)]
17555        if __tmp.remaining() < Self::ENCODED_LEN {
17556            panic!(
17557                "buffer is too small (need {} bytes, but got {})",
17558                Self::ENCODED_LEN,
17559                __tmp.remaining(),
17560            )
17561        }
17562        __tmp.put_u64_le(self.usec);
17563        __tmp.put_f32_le(self.x);
17564        __tmp.put_f32_le(self.y);
17565        __tmp.put_f32_le(self.z);
17566        __tmp.put_f32_le(self.roll);
17567        __tmp.put_f32_le(self.pitch);
17568        __tmp.put_f32_le(self.yaw);
17569        for val in &self.covariance {
17570            __tmp.put_f32_le(*val);
17571        }
17572        __tmp.put_u8(self.reset_counter);
17573        if matches!(version, MavlinkVersion::V2) {
17574            let len = __tmp.len();
17575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17576        } else {
17577            __tmp.len()
17578        }
17579    }
17580}
17581#[doc = "id: 249"]
17582#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
17583#[derive(Debug, Clone, PartialEq)]
17584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17586pub struct MEMORY_VECT_DATA {
17587    #[doc = "Starting address of the debug variables"]
17588    pub address: u16,
17589    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
17590    pub ver: u8,
17591    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
17592    pub mavtype: u8,
17593    #[doc = "Memory contents at specified address"]
17594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17595    pub value: [i8; 32],
17596}
17597impl MEMORY_VECT_DATA {
17598    pub const ENCODED_LEN: usize = 36usize;
17599    pub const DEFAULT: Self = Self {
17600        address: 0_u16,
17601        ver: 0_u8,
17602        mavtype: 0_u8,
17603        value: [0_i8; 32usize],
17604    };
17605    #[cfg(feature = "arbitrary")]
17606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17607        use arbitrary::{Arbitrary, Unstructured};
17608        let mut buf = [0u8; 1024];
17609        rng.fill_bytes(&mut buf);
17610        let mut unstructured = Unstructured::new(&buf);
17611        Self::arbitrary(&mut unstructured).unwrap_or_default()
17612    }
17613}
17614impl Default for MEMORY_VECT_DATA {
17615    fn default() -> Self {
17616        Self::DEFAULT.clone()
17617    }
17618}
17619impl MessageData for MEMORY_VECT_DATA {
17620    type Message = MavMessage;
17621    const ID: u32 = 249u32;
17622    const NAME: &'static str = "MEMORY_VECT";
17623    const EXTRA_CRC: u8 = 204u8;
17624    const ENCODED_LEN: usize = 36usize;
17625    fn deser(
17626        _version: MavlinkVersion,
17627        __input: &[u8],
17628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17629        let avail_len = __input.len();
17630        let mut payload_buf = [0; Self::ENCODED_LEN];
17631        let mut buf = if avail_len < Self::ENCODED_LEN {
17632            payload_buf[0..avail_len].copy_from_slice(__input);
17633            Bytes::new(&payload_buf)
17634        } else {
17635            Bytes::new(__input)
17636        };
17637        let mut __struct = Self::default();
17638        __struct.address = buf.get_u16_le();
17639        __struct.ver = buf.get_u8();
17640        __struct.mavtype = buf.get_u8();
17641        for v in &mut __struct.value {
17642            let val = buf.get_i8();
17643            *v = val;
17644        }
17645        Ok(__struct)
17646    }
17647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17648        let mut __tmp = BytesMut::new(bytes);
17649        #[allow(clippy::absurd_extreme_comparisons)]
17650        #[allow(unused_comparisons)]
17651        if __tmp.remaining() < Self::ENCODED_LEN {
17652            panic!(
17653                "buffer is too small (need {} bytes, but got {})",
17654                Self::ENCODED_LEN,
17655                __tmp.remaining(),
17656            )
17657        }
17658        __tmp.put_u16_le(self.address);
17659        __tmp.put_u8(self.ver);
17660        __tmp.put_u8(self.mavtype);
17661        for val in &self.value {
17662            __tmp.put_i8(*val);
17663        }
17664        if matches!(version, MavlinkVersion::V2) {
17665            let len = __tmp.len();
17666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17667        } else {
17668            __tmp.len()
17669        }
17670    }
17671}
17672#[doc = "id: 437"]
17673#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
17674#[derive(Debug, Clone, PartialEq)]
17675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17677pub struct AVAILABLE_MODES_MONITOR_DATA {
17678    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
17679    pub seq: u8,
17680}
17681impl AVAILABLE_MODES_MONITOR_DATA {
17682    pub const ENCODED_LEN: usize = 1usize;
17683    pub const DEFAULT: Self = Self { seq: 0_u8 };
17684    #[cfg(feature = "arbitrary")]
17685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17686        use arbitrary::{Arbitrary, Unstructured};
17687        let mut buf = [0u8; 1024];
17688        rng.fill_bytes(&mut buf);
17689        let mut unstructured = Unstructured::new(&buf);
17690        Self::arbitrary(&mut unstructured).unwrap_or_default()
17691    }
17692}
17693impl Default for AVAILABLE_MODES_MONITOR_DATA {
17694    fn default() -> Self {
17695        Self::DEFAULT.clone()
17696    }
17697}
17698impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
17699    type Message = MavMessage;
17700    const ID: u32 = 437u32;
17701    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
17702    const EXTRA_CRC: u8 = 30u8;
17703    const ENCODED_LEN: usize = 1usize;
17704    fn deser(
17705        _version: MavlinkVersion,
17706        __input: &[u8],
17707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17708        let avail_len = __input.len();
17709        let mut payload_buf = [0; Self::ENCODED_LEN];
17710        let mut buf = if avail_len < Self::ENCODED_LEN {
17711            payload_buf[0..avail_len].copy_from_slice(__input);
17712            Bytes::new(&payload_buf)
17713        } else {
17714            Bytes::new(__input)
17715        };
17716        let mut __struct = Self::default();
17717        __struct.seq = buf.get_u8();
17718        Ok(__struct)
17719    }
17720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17721        let mut __tmp = BytesMut::new(bytes);
17722        #[allow(clippy::absurd_extreme_comparisons)]
17723        #[allow(unused_comparisons)]
17724        if __tmp.remaining() < Self::ENCODED_LEN {
17725            panic!(
17726                "buffer is too small (need {} bytes, but got {})",
17727                Self::ENCODED_LEN,
17728                __tmp.remaining(),
17729            )
17730        }
17731        __tmp.put_u8(self.seq);
17732        if matches!(version, MavlinkVersion::V2) {
17733            let len = __tmp.len();
17734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17735        } else {
17736            __tmp.len()
17737        }
17738    }
17739}
17740#[doc = "id: 133"]
17741#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
17742#[derive(Debug, Clone, PartialEq)]
17743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17745pub struct TERRAIN_REQUEST_DATA {
17746    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
17747    pub mask: u64,
17748    #[doc = "Latitude of SW corner of first grid"]
17749    pub lat: i32,
17750    #[doc = "Longitude of SW corner of first grid"]
17751    pub lon: i32,
17752    #[doc = "Grid spacing"]
17753    pub grid_spacing: u16,
17754}
17755impl TERRAIN_REQUEST_DATA {
17756    pub const ENCODED_LEN: usize = 18usize;
17757    pub const DEFAULT: Self = Self {
17758        mask: 0_u64,
17759        lat: 0_i32,
17760        lon: 0_i32,
17761        grid_spacing: 0_u16,
17762    };
17763    #[cfg(feature = "arbitrary")]
17764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17765        use arbitrary::{Arbitrary, Unstructured};
17766        let mut buf = [0u8; 1024];
17767        rng.fill_bytes(&mut buf);
17768        let mut unstructured = Unstructured::new(&buf);
17769        Self::arbitrary(&mut unstructured).unwrap_or_default()
17770    }
17771}
17772impl Default for TERRAIN_REQUEST_DATA {
17773    fn default() -> Self {
17774        Self::DEFAULT.clone()
17775    }
17776}
17777impl MessageData for TERRAIN_REQUEST_DATA {
17778    type Message = MavMessage;
17779    const ID: u32 = 133u32;
17780    const NAME: &'static str = "TERRAIN_REQUEST";
17781    const EXTRA_CRC: u8 = 6u8;
17782    const ENCODED_LEN: usize = 18usize;
17783    fn deser(
17784        _version: MavlinkVersion,
17785        __input: &[u8],
17786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17787        let avail_len = __input.len();
17788        let mut payload_buf = [0; Self::ENCODED_LEN];
17789        let mut buf = if avail_len < Self::ENCODED_LEN {
17790            payload_buf[0..avail_len].copy_from_slice(__input);
17791            Bytes::new(&payload_buf)
17792        } else {
17793            Bytes::new(__input)
17794        };
17795        let mut __struct = Self::default();
17796        __struct.mask = buf.get_u64_le();
17797        __struct.lat = buf.get_i32_le();
17798        __struct.lon = buf.get_i32_le();
17799        __struct.grid_spacing = buf.get_u16_le();
17800        Ok(__struct)
17801    }
17802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17803        let mut __tmp = BytesMut::new(bytes);
17804        #[allow(clippy::absurd_extreme_comparisons)]
17805        #[allow(unused_comparisons)]
17806        if __tmp.remaining() < Self::ENCODED_LEN {
17807            panic!(
17808                "buffer is too small (need {} bytes, but got {})",
17809                Self::ENCODED_LEN,
17810                __tmp.remaining(),
17811            )
17812        }
17813        __tmp.put_u64_le(self.mask);
17814        __tmp.put_i32_le(self.lat);
17815        __tmp.put_i32_le(self.lon);
17816        __tmp.put_u16_le(self.grid_spacing);
17817        if matches!(version, MavlinkVersion::V2) {
17818            let len = __tmp.len();
17819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17820        } else {
17821            __tmp.len()
17822        }
17823    }
17824}
17825#[doc = "id: 12915"]
17826#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
17827#[derive(Debug, Clone, PartialEq)]
17828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17830pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
17831    #[doc = "System ID (0 for broadcast)."]
17832    pub target_system: u8,
17833    #[doc = "Component ID (0 for broadcast)."]
17834    pub target_component: u8,
17835    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
17836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17837    pub id_or_mac: [u8; 20],
17838    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
17839    pub single_message_size: u8,
17840    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
17841    pub msg_pack_size: u8,
17842    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
17843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17844    pub messages: [u8; 225],
17845}
17846impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
17847    pub const ENCODED_LEN: usize = 249usize;
17848    pub const DEFAULT: Self = Self {
17849        target_system: 0_u8,
17850        target_component: 0_u8,
17851        id_or_mac: [0_u8; 20usize],
17852        single_message_size: 0_u8,
17853        msg_pack_size: 0_u8,
17854        messages: [0_u8; 225usize],
17855    };
17856    #[cfg(feature = "arbitrary")]
17857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17858        use arbitrary::{Arbitrary, Unstructured};
17859        let mut buf = [0u8; 1024];
17860        rng.fill_bytes(&mut buf);
17861        let mut unstructured = Unstructured::new(&buf);
17862        Self::arbitrary(&mut unstructured).unwrap_or_default()
17863    }
17864}
17865impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
17866    fn default() -> Self {
17867        Self::DEFAULT.clone()
17868    }
17869}
17870impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
17871    type Message = MavMessage;
17872    const ID: u32 = 12915u32;
17873    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
17874    const EXTRA_CRC: u8 = 94u8;
17875    const ENCODED_LEN: usize = 249usize;
17876    fn deser(
17877        _version: MavlinkVersion,
17878        __input: &[u8],
17879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17880        let avail_len = __input.len();
17881        let mut payload_buf = [0; Self::ENCODED_LEN];
17882        let mut buf = if avail_len < Self::ENCODED_LEN {
17883            payload_buf[0..avail_len].copy_from_slice(__input);
17884            Bytes::new(&payload_buf)
17885        } else {
17886            Bytes::new(__input)
17887        };
17888        let mut __struct = Self::default();
17889        __struct.target_system = buf.get_u8();
17890        __struct.target_component = buf.get_u8();
17891        for v in &mut __struct.id_or_mac {
17892            let val = buf.get_u8();
17893            *v = val;
17894        }
17895        __struct.single_message_size = buf.get_u8();
17896        __struct.msg_pack_size = buf.get_u8();
17897        for v in &mut __struct.messages {
17898            let val = buf.get_u8();
17899            *v = val;
17900        }
17901        Ok(__struct)
17902    }
17903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17904        let mut __tmp = BytesMut::new(bytes);
17905        #[allow(clippy::absurd_extreme_comparisons)]
17906        #[allow(unused_comparisons)]
17907        if __tmp.remaining() < Self::ENCODED_LEN {
17908            panic!(
17909                "buffer is too small (need {} bytes, but got {})",
17910                Self::ENCODED_LEN,
17911                __tmp.remaining(),
17912            )
17913        }
17914        __tmp.put_u8(self.target_system);
17915        __tmp.put_u8(self.target_component);
17916        for val in &self.id_or_mac {
17917            __tmp.put_u8(*val);
17918        }
17919        __tmp.put_u8(self.single_message_size);
17920        __tmp.put_u8(self.msg_pack_size);
17921        for val in &self.messages {
17922            __tmp.put_u8(*val);
17923        }
17924        if matches!(version, MavlinkVersion::V2) {
17925            let len = __tmp.len();
17926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17927        } else {
17928            __tmp.len()
17929        }
17930    }
17931}
17932#[doc = "id: 116"]
17933#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
17934#[derive(Debug, Clone, PartialEq)]
17935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17937pub struct SCALED_IMU2_DATA {
17938    #[doc = "Timestamp (time since system boot)."]
17939    pub time_boot_ms: u32,
17940    #[doc = "X acceleration"]
17941    pub xacc: i16,
17942    #[doc = "Y acceleration"]
17943    pub yacc: i16,
17944    #[doc = "Z acceleration"]
17945    pub zacc: i16,
17946    #[doc = "Angular speed around X axis"]
17947    pub xgyro: i16,
17948    #[doc = "Angular speed around Y axis"]
17949    pub ygyro: i16,
17950    #[doc = "Angular speed around Z axis"]
17951    pub zgyro: i16,
17952    #[doc = "X Magnetic field"]
17953    pub xmag: i16,
17954    #[doc = "Y Magnetic field"]
17955    pub ymag: i16,
17956    #[doc = "Z Magnetic field"]
17957    pub zmag: i16,
17958    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
17959    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17960    pub temperature: i16,
17961}
17962impl SCALED_IMU2_DATA {
17963    pub const ENCODED_LEN: usize = 24usize;
17964    pub const DEFAULT: Self = Self {
17965        time_boot_ms: 0_u32,
17966        xacc: 0_i16,
17967        yacc: 0_i16,
17968        zacc: 0_i16,
17969        xgyro: 0_i16,
17970        ygyro: 0_i16,
17971        zgyro: 0_i16,
17972        xmag: 0_i16,
17973        ymag: 0_i16,
17974        zmag: 0_i16,
17975        temperature: 0_i16,
17976    };
17977    #[cfg(feature = "arbitrary")]
17978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17979        use arbitrary::{Arbitrary, Unstructured};
17980        let mut buf = [0u8; 1024];
17981        rng.fill_bytes(&mut buf);
17982        let mut unstructured = Unstructured::new(&buf);
17983        Self::arbitrary(&mut unstructured).unwrap_or_default()
17984    }
17985}
17986impl Default for SCALED_IMU2_DATA {
17987    fn default() -> Self {
17988        Self::DEFAULT.clone()
17989    }
17990}
17991impl MessageData for SCALED_IMU2_DATA {
17992    type Message = MavMessage;
17993    const ID: u32 = 116u32;
17994    const NAME: &'static str = "SCALED_IMU2";
17995    const EXTRA_CRC: u8 = 76u8;
17996    const ENCODED_LEN: usize = 24usize;
17997    fn deser(
17998        _version: MavlinkVersion,
17999        __input: &[u8],
18000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18001        let avail_len = __input.len();
18002        let mut payload_buf = [0; Self::ENCODED_LEN];
18003        let mut buf = if avail_len < Self::ENCODED_LEN {
18004            payload_buf[0..avail_len].copy_from_slice(__input);
18005            Bytes::new(&payload_buf)
18006        } else {
18007            Bytes::new(__input)
18008        };
18009        let mut __struct = Self::default();
18010        __struct.time_boot_ms = buf.get_u32_le();
18011        __struct.xacc = buf.get_i16_le();
18012        __struct.yacc = buf.get_i16_le();
18013        __struct.zacc = buf.get_i16_le();
18014        __struct.xgyro = buf.get_i16_le();
18015        __struct.ygyro = buf.get_i16_le();
18016        __struct.zgyro = buf.get_i16_le();
18017        __struct.xmag = buf.get_i16_le();
18018        __struct.ymag = buf.get_i16_le();
18019        __struct.zmag = buf.get_i16_le();
18020        __struct.temperature = buf.get_i16_le();
18021        Ok(__struct)
18022    }
18023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18024        let mut __tmp = BytesMut::new(bytes);
18025        #[allow(clippy::absurd_extreme_comparisons)]
18026        #[allow(unused_comparisons)]
18027        if __tmp.remaining() < Self::ENCODED_LEN {
18028            panic!(
18029                "buffer is too small (need {} bytes, but got {})",
18030                Self::ENCODED_LEN,
18031                __tmp.remaining(),
18032            )
18033        }
18034        __tmp.put_u32_le(self.time_boot_ms);
18035        __tmp.put_i16_le(self.xacc);
18036        __tmp.put_i16_le(self.yacc);
18037        __tmp.put_i16_le(self.zacc);
18038        __tmp.put_i16_le(self.xgyro);
18039        __tmp.put_i16_le(self.ygyro);
18040        __tmp.put_i16_le(self.zgyro);
18041        __tmp.put_i16_le(self.xmag);
18042        __tmp.put_i16_le(self.ymag);
18043        __tmp.put_i16_le(self.zmag);
18044        __tmp.put_i16_le(self.temperature);
18045        if matches!(version, MavlinkVersion::V2) {
18046            let len = __tmp.len();
18047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18048        } else {
18049            __tmp.len()
18050        }
18051    }
18052}
18053#[doc = "id: 126"]
18054#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
18055#[derive(Debug, Clone, PartialEq)]
18056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18058pub struct SERIAL_CONTROL_DATA {
18059    #[doc = "Baudrate of transfer. Zero means no change."]
18060    pub baudrate: u32,
18061    #[doc = "Timeout for reply data"]
18062    pub timeout: u16,
18063    #[doc = "Serial control device type."]
18064    pub device: SerialControlDev,
18065    #[doc = "Bitmap of serial control flags."]
18066    pub flags: SerialControlFlag,
18067    #[doc = "how many bytes in this transfer"]
18068    pub count: u8,
18069    #[doc = "serial data"]
18070    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18071    pub data: [u8; 70],
18072    #[doc = "System ID"]
18073    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18074    pub target_system: u8,
18075    #[doc = "Component ID"]
18076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18077    pub target_component: u8,
18078}
18079impl SERIAL_CONTROL_DATA {
18080    pub const ENCODED_LEN: usize = 81usize;
18081    pub const DEFAULT: Self = Self {
18082        baudrate: 0_u32,
18083        timeout: 0_u16,
18084        device: SerialControlDev::DEFAULT,
18085        flags: SerialControlFlag::DEFAULT,
18086        count: 0_u8,
18087        data: [0_u8; 70usize],
18088        target_system: 0_u8,
18089        target_component: 0_u8,
18090    };
18091    #[cfg(feature = "arbitrary")]
18092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18093        use arbitrary::{Arbitrary, Unstructured};
18094        let mut buf = [0u8; 1024];
18095        rng.fill_bytes(&mut buf);
18096        let mut unstructured = Unstructured::new(&buf);
18097        Self::arbitrary(&mut unstructured).unwrap_or_default()
18098    }
18099}
18100impl Default for SERIAL_CONTROL_DATA {
18101    fn default() -> Self {
18102        Self::DEFAULT.clone()
18103    }
18104}
18105impl MessageData for SERIAL_CONTROL_DATA {
18106    type Message = MavMessage;
18107    const ID: u32 = 126u32;
18108    const NAME: &'static str = "SERIAL_CONTROL";
18109    const EXTRA_CRC: u8 = 220u8;
18110    const ENCODED_LEN: usize = 81usize;
18111    fn deser(
18112        _version: MavlinkVersion,
18113        __input: &[u8],
18114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18115        let avail_len = __input.len();
18116        let mut payload_buf = [0; Self::ENCODED_LEN];
18117        let mut buf = if avail_len < Self::ENCODED_LEN {
18118            payload_buf[0..avail_len].copy_from_slice(__input);
18119            Bytes::new(&payload_buf)
18120        } else {
18121            Bytes::new(__input)
18122        };
18123        let mut __struct = Self::default();
18124        __struct.baudrate = buf.get_u32_le();
18125        __struct.timeout = buf.get_u16_le();
18126        let tmp = buf.get_u8();
18127        __struct.device =
18128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18129                enum_type: "SerialControlDev",
18130                value: tmp as u32,
18131            })?;
18132        let tmp = buf.get_u8();
18133        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
18134            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18135                flag_type: "SerialControlFlag",
18136                value: tmp as u32,
18137            })?;
18138        __struct.count = buf.get_u8();
18139        for v in &mut __struct.data {
18140            let val = buf.get_u8();
18141            *v = val;
18142        }
18143        __struct.target_system = buf.get_u8();
18144        __struct.target_component = buf.get_u8();
18145        Ok(__struct)
18146    }
18147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18148        let mut __tmp = BytesMut::new(bytes);
18149        #[allow(clippy::absurd_extreme_comparisons)]
18150        #[allow(unused_comparisons)]
18151        if __tmp.remaining() < Self::ENCODED_LEN {
18152            panic!(
18153                "buffer is too small (need {} bytes, but got {})",
18154                Self::ENCODED_LEN,
18155                __tmp.remaining(),
18156            )
18157        }
18158        __tmp.put_u32_le(self.baudrate);
18159        __tmp.put_u16_le(self.timeout);
18160        __tmp.put_u8(self.device as u8);
18161        __tmp.put_u8(self.flags.bits());
18162        __tmp.put_u8(self.count);
18163        for val in &self.data {
18164            __tmp.put_u8(*val);
18165        }
18166        __tmp.put_u8(self.target_system);
18167        __tmp.put_u8(self.target_component);
18168        if matches!(version, MavlinkVersion::V2) {
18169            let len = __tmp.len();
18170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18171        } else {
18172            __tmp.len()
18173        }
18174    }
18175}
18176#[doc = "id: 51"]
18177#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
18178#[derive(Debug, Clone, PartialEq)]
18179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18181pub struct MISSION_REQUEST_INT_DATA {
18182    #[doc = "Sequence"]
18183    pub seq: u16,
18184    #[doc = "System ID"]
18185    pub target_system: u8,
18186    #[doc = "Component ID"]
18187    pub target_component: u8,
18188    #[doc = "Mission type."]
18189    #[cfg_attr(feature = "serde", serde(default))]
18190    pub mission_type: MavMissionType,
18191}
18192impl MISSION_REQUEST_INT_DATA {
18193    pub const ENCODED_LEN: usize = 5usize;
18194    pub const DEFAULT: Self = Self {
18195        seq: 0_u16,
18196        target_system: 0_u8,
18197        target_component: 0_u8,
18198        mission_type: MavMissionType::DEFAULT,
18199    };
18200    #[cfg(feature = "arbitrary")]
18201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18202        use arbitrary::{Arbitrary, Unstructured};
18203        let mut buf = [0u8; 1024];
18204        rng.fill_bytes(&mut buf);
18205        let mut unstructured = Unstructured::new(&buf);
18206        Self::arbitrary(&mut unstructured).unwrap_or_default()
18207    }
18208}
18209impl Default for MISSION_REQUEST_INT_DATA {
18210    fn default() -> Self {
18211        Self::DEFAULT.clone()
18212    }
18213}
18214impl MessageData for MISSION_REQUEST_INT_DATA {
18215    type Message = MavMessage;
18216    const ID: u32 = 51u32;
18217    const NAME: &'static str = "MISSION_REQUEST_INT";
18218    const EXTRA_CRC: u8 = 196u8;
18219    const ENCODED_LEN: usize = 5usize;
18220    fn deser(
18221        _version: MavlinkVersion,
18222        __input: &[u8],
18223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18224        let avail_len = __input.len();
18225        let mut payload_buf = [0; Self::ENCODED_LEN];
18226        let mut buf = if avail_len < Self::ENCODED_LEN {
18227            payload_buf[0..avail_len].copy_from_slice(__input);
18228            Bytes::new(&payload_buf)
18229        } else {
18230            Bytes::new(__input)
18231        };
18232        let mut __struct = Self::default();
18233        __struct.seq = buf.get_u16_le();
18234        __struct.target_system = buf.get_u8();
18235        __struct.target_component = buf.get_u8();
18236        let tmp = buf.get_u8();
18237        __struct.mission_type =
18238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18239                enum_type: "MavMissionType",
18240                value: tmp as u32,
18241            })?;
18242        Ok(__struct)
18243    }
18244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18245        let mut __tmp = BytesMut::new(bytes);
18246        #[allow(clippy::absurd_extreme_comparisons)]
18247        #[allow(unused_comparisons)]
18248        if __tmp.remaining() < Self::ENCODED_LEN {
18249            panic!(
18250                "buffer is too small (need {} bytes, but got {})",
18251                Self::ENCODED_LEN,
18252                __tmp.remaining(),
18253            )
18254        }
18255        __tmp.put_u16_le(self.seq);
18256        __tmp.put_u8(self.target_system);
18257        __tmp.put_u8(self.target_component);
18258        __tmp.put_u8(self.mission_type as u8);
18259        if matches!(version, MavlinkVersion::V2) {
18260            let len = __tmp.len();
18261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18262        } else {
18263            __tmp.len()
18264        }
18265    }
18266}
18267#[doc = "id: 135"]
18268#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
18269#[derive(Debug, Clone, PartialEq)]
18270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18272pub struct TERRAIN_CHECK_DATA {
18273    #[doc = "Latitude"]
18274    pub lat: i32,
18275    #[doc = "Longitude"]
18276    pub lon: i32,
18277}
18278impl TERRAIN_CHECK_DATA {
18279    pub const ENCODED_LEN: usize = 8usize;
18280    pub const DEFAULT: Self = Self {
18281        lat: 0_i32,
18282        lon: 0_i32,
18283    };
18284    #[cfg(feature = "arbitrary")]
18285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18286        use arbitrary::{Arbitrary, Unstructured};
18287        let mut buf = [0u8; 1024];
18288        rng.fill_bytes(&mut buf);
18289        let mut unstructured = Unstructured::new(&buf);
18290        Self::arbitrary(&mut unstructured).unwrap_or_default()
18291    }
18292}
18293impl Default for TERRAIN_CHECK_DATA {
18294    fn default() -> Self {
18295        Self::DEFAULT.clone()
18296    }
18297}
18298impl MessageData for TERRAIN_CHECK_DATA {
18299    type Message = MavMessage;
18300    const ID: u32 = 135u32;
18301    const NAME: &'static str = "TERRAIN_CHECK";
18302    const EXTRA_CRC: u8 = 203u8;
18303    const ENCODED_LEN: usize = 8usize;
18304    fn deser(
18305        _version: MavlinkVersion,
18306        __input: &[u8],
18307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18308        let avail_len = __input.len();
18309        let mut payload_buf = [0; Self::ENCODED_LEN];
18310        let mut buf = if avail_len < Self::ENCODED_LEN {
18311            payload_buf[0..avail_len].copy_from_slice(__input);
18312            Bytes::new(&payload_buf)
18313        } else {
18314            Bytes::new(__input)
18315        };
18316        let mut __struct = Self::default();
18317        __struct.lat = buf.get_i32_le();
18318        __struct.lon = buf.get_i32_le();
18319        Ok(__struct)
18320    }
18321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18322        let mut __tmp = BytesMut::new(bytes);
18323        #[allow(clippy::absurd_extreme_comparisons)]
18324        #[allow(unused_comparisons)]
18325        if __tmp.remaining() < Self::ENCODED_LEN {
18326            panic!(
18327                "buffer is too small (need {} bytes, but got {})",
18328                Self::ENCODED_LEN,
18329                __tmp.remaining(),
18330            )
18331        }
18332        __tmp.put_i32_le(self.lat);
18333        __tmp.put_i32_le(self.lon);
18334        if matches!(version, MavlinkVersion::V2) {
18335            let len = __tmp.len();
18336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18337        } else {
18338            __tmp.len()
18339        }
18340    }
18341}
18342#[doc = "id: 256"]
18343#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
18344#[derive(Debug, Clone, PartialEq)]
18345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18347pub struct SETUP_SIGNING_DATA {
18348    #[doc = "initial timestamp"]
18349    pub initial_timestamp: u64,
18350    #[doc = "system id of the target"]
18351    pub target_system: u8,
18352    #[doc = "component ID of the target"]
18353    pub target_component: u8,
18354    #[doc = "signing key"]
18355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18356    pub secret_key: [u8; 32],
18357}
18358impl SETUP_SIGNING_DATA {
18359    pub const ENCODED_LEN: usize = 42usize;
18360    pub const DEFAULT: Self = Self {
18361        initial_timestamp: 0_u64,
18362        target_system: 0_u8,
18363        target_component: 0_u8,
18364        secret_key: [0_u8; 32usize],
18365    };
18366    #[cfg(feature = "arbitrary")]
18367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18368        use arbitrary::{Arbitrary, Unstructured};
18369        let mut buf = [0u8; 1024];
18370        rng.fill_bytes(&mut buf);
18371        let mut unstructured = Unstructured::new(&buf);
18372        Self::arbitrary(&mut unstructured).unwrap_or_default()
18373    }
18374}
18375impl Default for SETUP_SIGNING_DATA {
18376    fn default() -> Self {
18377        Self::DEFAULT.clone()
18378    }
18379}
18380impl MessageData for SETUP_SIGNING_DATA {
18381    type Message = MavMessage;
18382    const ID: u32 = 256u32;
18383    const NAME: &'static str = "SETUP_SIGNING";
18384    const EXTRA_CRC: u8 = 71u8;
18385    const ENCODED_LEN: usize = 42usize;
18386    fn deser(
18387        _version: MavlinkVersion,
18388        __input: &[u8],
18389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18390        let avail_len = __input.len();
18391        let mut payload_buf = [0; Self::ENCODED_LEN];
18392        let mut buf = if avail_len < Self::ENCODED_LEN {
18393            payload_buf[0..avail_len].copy_from_slice(__input);
18394            Bytes::new(&payload_buf)
18395        } else {
18396            Bytes::new(__input)
18397        };
18398        let mut __struct = Self::default();
18399        __struct.initial_timestamp = buf.get_u64_le();
18400        __struct.target_system = buf.get_u8();
18401        __struct.target_component = buf.get_u8();
18402        for v in &mut __struct.secret_key {
18403            let val = buf.get_u8();
18404            *v = val;
18405        }
18406        Ok(__struct)
18407    }
18408    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18409        let mut __tmp = BytesMut::new(bytes);
18410        #[allow(clippy::absurd_extreme_comparisons)]
18411        #[allow(unused_comparisons)]
18412        if __tmp.remaining() < Self::ENCODED_LEN {
18413            panic!(
18414                "buffer is too small (need {} bytes, but got {})",
18415                Self::ENCODED_LEN,
18416                __tmp.remaining(),
18417            )
18418        }
18419        __tmp.put_u64_le(self.initial_timestamp);
18420        __tmp.put_u8(self.target_system);
18421        __tmp.put_u8(self.target_component);
18422        for val in &self.secret_key {
18423            __tmp.put_u8(*val);
18424        }
18425        if matches!(version, MavlinkVersion::V2) {
18426            let len = __tmp.len();
18427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18428        } else {
18429            __tmp.len()
18430        }
18431    }
18432}
18433#[doc = "id: 87"]
18434#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
18435#[derive(Debug, Clone, PartialEq)]
18436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18438pub struct POSITION_TARGET_GLOBAL_INT_DATA {
18439    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
18440    pub time_boot_ms: u32,
18441    #[doc = "Latitude in WGS84 frame"]
18442    pub lat_int: i32,
18443    #[doc = "Longitude in WGS84 frame"]
18444    pub lon_int: i32,
18445    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
18446    pub alt: f32,
18447    #[doc = "X velocity in NED frame"]
18448    pub vx: f32,
18449    #[doc = "Y velocity in NED frame"]
18450    pub vy: f32,
18451    #[doc = "Z velocity in NED frame"]
18452    pub vz: f32,
18453    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
18454    pub afx: f32,
18455    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
18456    pub afy: f32,
18457    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
18458    pub afz: f32,
18459    #[doc = "yaw setpoint"]
18460    pub yaw: f32,
18461    #[doc = "yaw rate setpoint"]
18462    pub yaw_rate: f32,
18463    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
18464    pub type_mask: PositionTargetTypemask,
18465    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
18466    pub coordinate_frame: MavFrame,
18467}
18468impl POSITION_TARGET_GLOBAL_INT_DATA {
18469    pub const ENCODED_LEN: usize = 51usize;
18470    pub const DEFAULT: Self = Self {
18471        time_boot_ms: 0_u32,
18472        lat_int: 0_i32,
18473        lon_int: 0_i32,
18474        alt: 0.0_f32,
18475        vx: 0.0_f32,
18476        vy: 0.0_f32,
18477        vz: 0.0_f32,
18478        afx: 0.0_f32,
18479        afy: 0.0_f32,
18480        afz: 0.0_f32,
18481        yaw: 0.0_f32,
18482        yaw_rate: 0.0_f32,
18483        type_mask: PositionTargetTypemask::DEFAULT,
18484        coordinate_frame: MavFrame::DEFAULT,
18485    };
18486    #[cfg(feature = "arbitrary")]
18487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18488        use arbitrary::{Arbitrary, Unstructured};
18489        let mut buf = [0u8; 1024];
18490        rng.fill_bytes(&mut buf);
18491        let mut unstructured = Unstructured::new(&buf);
18492        Self::arbitrary(&mut unstructured).unwrap_or_default()
18493    }
18494}
18495impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
18496    fn default() -> Self {
18497        Self::DEFAULT.clone()
18498    }
18499}
18500impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
18501    type Message = MavMessage;
18502    const ID: u32 = 87u32;
18503    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
18504    const EXTRA_CRC: u8 = 150u8;
18505    const ENCODED_LEN: usize = 51usize;
18506    fn deser(
18507        _version: MavlinkVersion,
18508        __input: &[u8],
18509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18510        let avail_len = __input.len();
18511        let mut payload_buf = [0; Self::ENCODED_LEN];
18512        let mut buf = if avail_len < Self::ENCODED_LEN {
18513            payload_buf[0..avail_len].copy_from_slice(__input);
18514            Bytes::new(&payload_buf)
18515        } else {
18516            Bytes::new(__input)
18517        };
18518        let mut __struct = Self::default();
18519        __struct.time_boot_ms = buf.get_u32_le();
18520        __struct.lat_int = buf.get_i32_le();
18521        __struct.lon_int = buf.get_i32_le();
18522        __struct.alt = buf.get_f32_le();
18523        __struct.vx = buf.get_f32_le();
18524        __struct.vy = buf.get_f32_le();
18525        __struct.vz = buf.get_f32_le();
18526        __struct.afx = buf.get_f32_le();
18527        __struct.afy = buf.get_f32_le();
18528        __struct.afz = buf.get_f32_le();
18529        __struct.yaw = buf.get_f32_le();
18530        __struct.yaw_rate = buf.get_f32_le();
18531        let tmp = buf.get_u16_le();
18532        __struct.type_mask = PositionTargetTypemask::from_bits(
18533            tmp & PositionTargetTypemask::all().bits(),
18534        )
18535        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18536            flag_type: "PositionTargetTypemask",
18537            value: tmp as u32,
18538        })?;
18539        let tmp = buf.get_u8();
18540        __struct.coordinate_frame =
18541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18542                enum_type: "MavFrame",
18543                value: tmp as u32,
18544            })?;
18545        Ok(__struct)
18546    }
18547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18548        let mut __tmp = BytesMut::new(bytes);
18549        #[allow(clippy::absurd_extreme_comparisons)]
18550        #[allow(unused_comparisons)]
18551        if __tmp.remaining() < Self::ENCODED_LEN {
18552            panic!(
18553                "buffer is too small (need {} bytes, but got {})",
18554                Self::ENCODED_LEN,
18555                __tmp.remaining(),
18556            )
18557        }
18558        __tmp.put_u32_le(self.time_boot_ms);
18559        __tmp.put_i32_le(self.lat_int);
18560        __tmp.put_i32_le(self.lon_int);
18561        __tmp.put_f32_le(self.alt);
18562        __tmp.put_f32_le(self.vx);
18563        __tmp.put_f32_le(self.vy);
18564        __tmp.put_f32_le(self.vz);
18565        __tmp.put_f32_le(self.afx);
18566        __tmp.put_f32_le(self.afy);
18567        __tmp.put_f32_le(self.afz);
18568        __tmp.put_f32_le(self.yaw);
18569        __tmp.put_f32_le(self.yaw_rate);
18570        __tmp.put_u16_le(self.type_mask.bits());
18571        __tmp.put_u8(self.coordinate_frame as u8);
18572        if matches!(version, MavlinkVersion::V2) {
18573            let len = __tmp.len();
18574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18575        } else {
18576            __tmp.len()
18577        }
18578    }
18579}
18580#[doc = "id: 2"]
18581#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
18582#[derive(Debug, Clone, PartialEq)]
18583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18585pub struct SYSTEM_TIME_DATA {
18586    #[doc = "Timestamp (UNIX epoch time)."]
18587    pub time_unix_usec: u64,
18588    #[doc = "Timestamp (time since system boot)."]
18589    pub time_boot_ms: u32,
18590}
18591impl SYSTEM_TIME_DATA {
18592    pub const ENCODED_LEN: usize = 12usize;
18593    pub const DEFAULT: Self = Self {
18594        time_unix_usec: 0_u64,
18595        time_boot_ms: 0_u32,
18596    };
18597    #[cfg(feature = "arbitrary")]
18598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18599        use arbitrary::{Arbitrary, Unstructured};
18600        let mut buf = [0u8; 1024];
18601        rng.fill_bytes(&mut buf);
18602        let mut unstructured = Unstructured::new(&buf);
18603        Self::arbitrary(&mut unstructured).unwrap_or_default()
18604    }
18605}
18606impl Default for SYSTEM_TIME_DATA {
18607    fn default() -> Self {
18608        Self::DEFAULT.clone()
18609    }
18610}
18611impl MessageData for SYSTEM_TIME_DATA {
18612    type Message = MavMessage;
18613    const ID: u32 = 2u32;
18614    const NAME: &'static str = "SYSTEM_TIME";
18615    const EXTRA_CRC: u8 = 137u8;
18616    const ENCODED_LEN: usize = 12usize;
18617    fn deser(
18618        _version: MavlinkVersion,
18619        __input: &[u8],
18620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18621        let avail_len = __input.len();
18622        let mut payload_buf = [0; Self::ENCODED_LEN];
18623        let mut buf = if avail_len < Self::ENCODED_LEN {
18624            payload_buf[0..avail_len].copy_from_slice(__input);
18625            Bytes::new(&payload_buf)
18626        } else {
18627            Bytes::new(__input)
18628        };
18629        let mut __struct = Self::default();
18630        __struct.time_unix_usec = buf.get_u64_le();
18631        __struct.time_boot_ms = buf.get_u32_le();
18632        Ok(__struct)
18633    }
18634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18635        let mut __tmp = BytesMut::new(bytes);
18636        #[allow(clippy::absurd_extreme_comparisons)]
18637        #[allow(unused_comparisons)]
18638        if __tmp.remaining() < Self::ENCODED_LEN {
18639            panic!(
18640                "buffer is too small (need {} bytes, but got {})",
18641                Self::ENCODED_LEN,
18642                __tmp.remaining(),
18643            )
18644        }
18645        __tmp.put_u64_le(self.time_unix_usec);
18646        __tmp.put_u32_le(self.time_boot_ms);
18647        if matches!(version, MavlinkVersion::V2) {
18648            let len = __tmp.len();
18649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18650        } else {
18651            __tmp.len()
18652        }
18653    }
18654}
18655#[doc = "id: 259"]
18656#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
18657#[derive(Debug, Clone, PartialEq)]
18658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18660pub struct CAMERA_INFORMATION_DATA {
18661    #[doc = "Timestamp (time since system boot)."]
18662    pub time_boot_ms: u32,
18663    #[doc = "0xff). Use 0 if not known."]
18664    pub firmware_version: u32,
18665    #[doc = "Focal length. Use NaN if not known."]
18666    pub focal_length: f32,
18667    #[doc = "Image sensor size horizontal. Use NaN if not known."]
18668    pub sensor_size_h: f32,
18669    #[doc = "Image sensor size vertical. Use NaN if not known."]
18670    pub sensor_size_v: f32,
18671    #[doc = "Bitmap of camera capability flags."]
18672    pub flags: CameraCapFlags,
18673    #[doc = "Horizontal image resolution. Use 0 if not known."]
18674    pub resolution_h: u16,
18675    #[doc = "Vertical image resolution. Use 0 if not known."]
18676    pub resolution_v: u16,
18677    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
18678    pub cam_definition_version: u16,
18679    #[doc = "Name of the camera vendor"]
18680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18681    pub vendor_name: [u8; 32],
18682    #[doc = "Name of the camera model"]
18683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18684    pub model_name: [u8; 32],
18685    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
18686    pub lens_id: u8,
18687    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
18688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18689    pub cam_definition_uri: [u8; 140],
18690    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
18691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18692    pub gimbal_device_id: u8,
18693    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
18694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18695    pub camera_device_id: u8,
18696}
18697impl CAMERA_INFORMATION_DATA {
18698    pub const ENCODED_LEN: usize = 237usize;
18699    pub const DEFAULT: Self = Self {
18700        time_boot_ms: 0_u32,
18701        firmware_version: 0_u32,
18702        focal_length: 0.0_f32,
18703        sensor_size_h: 0.0_f32,
18704        sensor_size_v: 0.0_f32,
18705        flags: CameraCapFlags::DEFAULT,
18706        resolution_h: 0_u16,
18707        resolution_v: 0_u16,
18708        cam_definition_version: 0_u16,
18709        vendor_name: [0_u8; 32usize],
18710        model_name: [0_u8; 32usize],
18711        lens_id: 0_u8,
18712        cam_definition_uri: [0_u8; 140usize],
18713        gimbal_device_id: 0_u8,
18714        camera_device_id: 0_u8,
18715    };
18716    #[cfg(feature = "arbitrary")]
18717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18718        use arbitrary::{Arbitrary, Unstructured};
18719        let mut buf = [0u8; 1024];
18720        rng.fill_bytes(&mut buf);
18721        let mut unstructured = Unstructured::new(&buf);
18722        Self::arbitrary(&mut unstructured).unwrap_or_default()
18723    }
18724}
18725impl Default for CAMERA_INFORMATION_DATA {
18726    fn default() -> Self {
18727        Self::DEFAULT.clone()
18728    }
18729}
18730impl MessageData for CAMERA_INFORMATION_DATA {
18731    type Message = MavMessage;
18732    const ID: u32 = 259u32;
18733    const NAME: &'static str = "CAMERA_INFORMATION";
18734    const EXTRA_CRC: u8 = 92u8;
18735    const ENCODED_LEN: usize = 237usize;
18736    fn deser(
18737        _version: MavlinkVersion,
18738        __input: &[u8],
18739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18740        let avail_len = __input.len();
18741        let mut payload_buf = [0; Self::ENCODED_LEN];
18742        let mut buf = if avail_len < Self::ENCODED_LEN {
18743            payload_buf[0..avail_len].copy_from_slice(__input);
18744            Bytes::new(&payload_buf)
18745        } else {
18746            Bytes::new(__input)
18747        };
18748        let mut __struct = Self::default();
18749        __struct.time_boot_ms = buf.get_u32_le();
18750        __struct.firmware_version = buf.get_u32_le();
18751        __struct.focal_length = buf.get_f32_le();
18752        __struct.sensor_size_h = buf.get_f32_le();
18753        __struct.sensor_size_v = buf.get_f32_le();
18754        let tmp = buf.get_u32_le();
18755        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
18756            ::mavlink_core::error::ParserError::InvalidFlag {
18757                flag_type: "CameraCapFlags",
18758                value: tmp as u32,
18759            },
18760        )?;
18761        __struct.resolution_h = buf.get_u16_le();
18762        __struct.resolution_v = buf.get_u16_le();
18763        __struct.cam_definition_version = buf.get_u16_le();
18764        for v in &mut __struct.vendor_name {
18765            let val = buf.get_u8();
18766            *v = val;
18767        }
18768        for v in &mut __struct.model_name {
18769            let val = buf.get_u8();
18770            *v = val;
18771        }
18772        __struct.lens_id = buf.get_u8();
18773        for v in &mut __struct.cam_definition_uri {
18774            let val = buf.get_u8();
18775            *v = val;
18776        }
18777        __struct.gimbal_device_id = buf.get_u8();
18778        __struct.camera_device_id = buf.get_u8();
18779        Ok(__struct)
18780    }
18781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18782        let mut __tmp = BytesMut::new(bytes);
18783        #[allow(clippy::absurd_extreme_comparisons)]
18784        #[allow(unused_comparisons)]
18785        if __tmp.remaining() < Self::ENCODED_LEN {
18786            panic!(
18787                "buffer is too small (need {} bytes, but got {})",
18788                Self::ENCODED_LEN,
18789                __tmp.remaining(),
18790            )
18791        }
18792        __tmp.put_u32_le(self.time_boot_ms);
18793        __tmp.put_u32_le(self.firmware_version);
18794        __tmp.put_f32_le(self.focal_length);
18795        __tmp.put_f32_le(self.sensor_size_h);
18796        __tmp.put_f32_le(self.sensor_size_v);
18797        __tmp.put_u32_le(self.flags.bits());
18798        __tmp.put_u16_le(self.resolution_h);
18799        __tmp.put_u16_le(self.resolution_v);
18800        __tmp.put_u16_le(self.cam_definition_version);
18801        for val in &self.vendor_name {
18802            __tmp.put_u8(*val);
18803        }
18804        for val in &self.model_name {
18805            __tmp.put_u8(*val);
18806        }
18807        __tmp.put_u8(self.lens_id);
18808        for val in &self.cam_definition_uri {
18809            __tmp.put_u8(*val);
18810        }
18811        __tmp.put_u8(self.gimbal_device_id);
18812        __tmp.put_u8(self.camera_device_id);
18813        if matches!(version, MavlinkVersion::V2) {
18814            let len = __tmp.len();
18815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18816        } else {
18817            __tmp.len()
18818        }
18819    }
18820}
18821#[doc = "id: 436"]
18822#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
18823#[derive(Debug, Clone, PartialEq)]
18824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18826pub struct CURRENT_MODE_DATA {
18827    #[doc = "A bitfield for use for autopilot-specific flags"]
18828    pub custom_mode: u32,
18829    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
18830    pub intended_custom_mode: u32,
18831    #[doc = "Standard mode."]
18832    pub standard_mode: MavStandardMode,
18833}
18834impl CURRENT_MODE_DATA {
18835    pub const ENCODED_LEN: usize = 9usize;
18836    pub const DEFAULT: Self = Self {
18837        custom_mode: 0_u32,
18838        intended_custom_mode: 0_u32,
18839        standard_mode: MavStandardMode::DEFAULT,
18840    };
18841    #[cfg(feature = "arbitrary")]
18842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18843        use arbitrary::{Arbitrary, Unstructured};
18844        let mut buf = [0u8; 1024];
18845        rng.fill_bytes(&mut buf);
18846        let mut unstructured = Unstructured::new(&buf);
18847        Self::arbitrary(&mut unstructured).unwrap_or_default()
18848    }
18849}
18850impl Default for CURRENT_MODE_DATA {
18851    fn default() -> Self {
18852        Self::DEFAULT.clone()
18853    }
18854}
18855impl MessageData for CURRENT_MODE_DATA {
18856    type Message = MavMessage;
18857    const ID: u32 = 436u32;
18858    const NAME: &'static str = "CURRENT_MODE";
18859    const EXTRA_CRC: u8 = 193u8;
18860    const ENCODED_LEN: usize = 9usize;
18861    fn deser(
18862        _version: MavlinkVersion,
18863        __input: &[u8],
18864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18865        let avail_len = __input.len();
18866        let mut payload_buf = [0; Self::ENCODED_LEN];
18867        let mut buf = if avail_len < Self::ENCODED_LEN {
18868            payload_buf[0..avail_len].copy_from_slice(__input);
18869            Bytes::new(&payload_buf)
18870        } else {
18871            Bytes::new(__input)
18872        };
18873        let mut __struct = Self::default();
18874        __struct.custom_mode = buf.get_u32_le();
18875        __struct.intended_custom_mode = buf.get_u32_le();
18876        let tmp = buf.get_u8();
18877        __struct.standard_mode =
18878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18879                enum_type: "MavStandardMode",
18880                value: tmp as u32,
18881            })?;
18882        Ok(__struct)
18883    }
18884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18885        let mut __tmp = BytesMut::new(bytes);
18886        #[allow(clippy::absurd_extreme_comparisons)]
18887        #[allow(unused_comparisons)]
18888        if __tmp.remaining() < Self::ENCODED_LEN {
18889            panic!(
18890                "buffer is too small (need {} bytes, but got {})",
18891                Self::ENCODED_LEN,
18892                __tmp.remaining(),
18893            )
18894        }
18895        __tmp.put_u32_le(self.custom_mode);
18896        __tmp.put_u32_le(self.intended_custom_mode);
18897        __tmp.put_u8(self.standard_mode as u8);
18898        if matches!(version, MavlinkVersion::V2) {
18899            let len = __tmp.len();
18900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18901        } else {
18902            __tmp.len()
18903        }
18904    }
18905}
18906#[doc = "id: 43"]
18907#[doc = "Request the overall list of mission items from the system/component."]
18908#[derive(Debug, Clone, PartialEq)]
18909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18911pub struct MISSION_REQUEST_LIST_DATA {
18912    #[doc = "System ID"]
18913    pub target_system: u8,
18914    #[doc = "Component ID"]
18915    pub target_component: u8,
18916    #[doc = "Mission type."]
18917    #[cfg_attr(feature = "serde", serde(default))]
18918    pub mission_type: MavMissionType,
18919}
18920impl MISSION_REQUEST_LIST_DATA {
18921    pub const ENCODED_LEN: usize = 3usize;
18922    pub const DEFAULT: Self = Self {
18923        target_system: 0_u8,
18924        target_component: 0_u8,
18925        mission_type: MavMissionType::DEFAULT,
18926    };
18927    #[cfg(feature = "arbitrary")]
18928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18929        use arbitrary::{Arbitrary, Unstructured};
18930        let mut buf = [0u8; 1024];
18931        rng.fill_bytes(&mut buf);
18932        let mut unstructured = Unstructured::new(&buf);
18933        Self::arbitrary(&mut unstructured).unwrap_or_default()
18934    }
18935}
18936impl Default for MISSION_REQUEST_LIST_DATA {
18937    fn default() -> Self {
18938        Self::DEFAULT.clone()
18939    }
18940}
18941impl MessageData for MISSION_REQUEST_LIST_DATA {
18942    type Message = MavMessage;
18943    const ID: u32 = 43u32;
18944    const NAME: &'static str = "MISSION_REQUEST_LIST";
18945    const EXTRA_CRC: u8 = 132u8;
18946    const ENCODED_LEN: usize = 3usize;
18947    fn deser(
18948        _version: MavlinkVersion,
18949        __input: &[u8],
18950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18951        let avail_len = __input.len();
18952        let mut payload_buf = [0; Self::ENCODED_LEN];
18953        let mut buf = if avail_len < Self::ENCODED_LEN {
18954            payload_buf[0..avail_len].copy_from_slice(__input);
18955            Bytes::new(&payload_buf)
18956        } else {
18957            Bytes::new(__input)
18958        };
18959        let mut __struct = Self::default();
18960        __struct.target_system = buf.get_u8();
18961        __struct.target_component = buf.get_u8();
18962        let tmp = buf.get_u8();
18963        __struct.mission_type =
18964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18965                enum_type: "MavMissionType",
18966                value: tmp as u32,
18967            })?;
18968        Ok(__struct)
18969    }
18970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18971        let mut __tmp = BytesMut::new(bytes);
18972        #[allow(clippy::absurd_extreme_comparisons)]
18973        #[allow(unused_comparisons)]
18974        if __tmp.remaining() < Self::ENCODED_LEN {
18975            panic!(
18976                "buffer is too small (need {} bytes, but got {})",
18977                Self::ENCODED_LEN,
18978                __tmp.remaining(),
18979            )
18980        }
18981        __tmp.put_u8(self.target_system);
18982        __tmp.put_u8(self.target_component);
18983        __tmp.put_u8(self.mission_type as u8);
18984        if matches!(version, MavlinkVersion::V2) {
18985            let len = __tmp.len();
18986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18987        } else {
18988            __tmp.len()
18989        }
18990    }
18991}
18992#[doc = "id: 371"]
18993#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
18994#[derive(Debug, Clone, PartialEq)]
18995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18997pub struct FUEL_STATUS_DATA {
18998    #[doc = "Capacity when full. Must be provided."]
18999    pub maximum_fuel: f32,
19000    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
19001    pub consumed_fuel: f32,
19002    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
19003    pub remaining_fuel: f32,
19004    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
19005    pub flow_rate: f32,
19006    #[doc = "Fuel temperature. NaN: field not provided."]
19007    pub temperature: f32,
19008    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
19009    pub fuel_type: MavFuelType,
19010    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
19011    pub id: u8,
19012    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
19013    pub percent_remaining: u8,
19014}
19015impl FUEL_STATUS_DATA {
19016    pub const ENCODED_LEN: usize = 26usize;
19017    pub const DEFAULT: Self = Self {
19018        maximum_fuel: 0.0_f32,
19019        consumed_fuel: 0.0_f32,
19020        remaining_fuel: 0.0_f32,
19021        flow_rate: 0.0_f32,
19022        temperature: 0.0_f32,
19023        fuel_type: MavFuelType::DEFAULT,
19024        id: 0_u8,
19025        percent_remaining: 0_u8,
19026    };
19027    #[cfg(feature = "arbitrary")]
19028    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19029        use arbitrary::{Arbitrary, Unstructured};
19030        let mut buf = [0u8; 1024];
19031        rng.fill_bytes(&mut buf);
19032        let mut unstructured = Unstructured::new(&buf);
19033        Self::arbitrary(&mut unstructured).unwrap_or_default()
19034    }
19035}
19036impl Default for FUEL_STATUS_DATA {
19037    fn default() -> Self {
19038        Self::DEFAULT.clone()
19039    }
19040}
19041impl MessageData for FUEL_STATUS_DATA {
19042    type Message = MavMessage;
19043    const ID: u32 = 371u32;
19044    const NAME: &'static str = "FUEL_STATUS";
19045    const EXTRA_CRC: u8 = 10u8;
19046    const ENCODED_LEN: usize = 26usize;
19047    fn deser(
19048        _version: MavlinkVersion,
19049        __input: &[u8],
19050    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19051        let avail_len = __input.len();
19052        let mut payload_buf = [0; Self::ENCODED_LEN];
19053        let mut buf = if avail_len < Self::ENCODED_LEN {
19054            payload_buf[0..avail_len].copy_from_slice(__input);
19055            Bytes::new(&payload_buf)
19056        } else {
19057            Bytes::new(__input)
19058        };
19059        let mut __struct = Self::default();
19060        __struct.maximum_fuel = buf.get_f32_le();
19061        __struct.consumed_fuel = buf.get_f32_le();
19062        __struct.remaining_fuel = buf.get_f32_le();
19063        __struct.flow_rate = buf.get_f32_le();
19064        __struct.temperature = buf.get_f32_le();
19065        let tmp = buf.get_u32_le();
19066        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
19067            ::mavlink_core::error::ParserError::InvalidEnum {
19068                enum_type: "MavFuelType",
19069                value: tmp as u32,
19070            },
19071        )?;
19072        __struct.id = buf.get_u8();
19073        __struct.percent_remaining = buf.get_u8();
19074        Ok(__struct)
19075    }
19076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19077        let mut __tmp = BytesMut::new(bytes);
19078        #[allow(clippy::absurd_extreme_comparisons)]
19079        #[allow(unused_comparisons)]
19080        if __tmp.remaining() < Self::ENCODED_LEN {
19081            panic!(
19082                "buffer is too small (need {} bytes, but got {})",
19083                Self::ENCODED_LEN,
19084                __tmp.remaining(),
19085            )
19086        }
19087        __tmp.put_f32_le(self.maximum_fuel);
19088        __tmp.put_f32_le(self.consumed_fuel);
19089        __tmp.put_f32_le(self.remaining_fuel);
19090        __tmp.put_f32_le(self.flow_rate);
19091        __tmp.put_f32_le(self.temperature);
19092        __tmp.put_u32_le(self.fuel_type as u32);
19093        __tmp.put_u8(self.id);
19094        __tmp.put_u8(self.percent_remaining);
19095        if matches!(version, MavlinkVersion::V2) {
19096            let len = __tmp.len();
19097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19098        } else {
19099            __tmp.len()
19100        }
19101    }
19102}
19103#[doc = "id: 339"]
19104#[doc = "RPM sensor data message."]
19105#[derive(Debug, Clone, PartialEq)]
19106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19108pub struct RAW_RPM_DATA {
19109    #[doc = "Indicated rate"]
19110    pub frequency: f32,
19111    #[doc = "Index of this RPM sensor (0-indexed)"]
19112    pub index: u8,
19113}
19114impl RAW_RPM_DATA {
19115    pub const ENCODED_LEN: usize = 5usize;
19116    pub const DEFAULT: Self = Self {
19117        frequency: 0.0_f32,
19118        index: 0_u8,
19119    };
19120    #[cfg(feature = "arbitrary")]
19121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19122        use arbitrary::{Arbitrary, Unstructured};
19123        let mut buf = [0u8; 1024];
19124        rng.fill_bytes(&mut buf);
19125        let mut unstructured = Unstructured::new(&buf);
19126        Self::arbitrary(&mut unstructured).unwrap_or_default()
19127    }
19128}
19129impl Default for RAW_RPM_DATA {
19130    fn default() -> Self {
19131        Self::DEFAULT.clone()
19132    }
19133}
19134impl MessageData for RAW_RPM_DATA {
19135    type Message = MavMessage;
19136    const ID: u32 = 339u32;
19137    const NAME: &'static str = "RAW_RPM";
19138    const EXTRA_CRC: u8 = 199u8;
19139    const ENCODED_LEN: usize = 5usize;
19140    fn deser(
19141        _version: MavlinkVersion,
19142        __input: &[u8],
19143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19144        let avail_len = __input.len();
19145        let mut payload_buf = [0; Self::ENCODED_LEN];
19146        let mut buf = if avail_len < Self::ENCODED_LEN {
19147            payload_buf[0..avail_len].copy_from_slice(__input);
19148            Bytes::new(&payload_buf)
19149        } else {
19150            Bytes::new(__input)
19151        };
19152        let mut __struct = Self::default();
19153        __struct.frequency = buf.get_f32_le();
19154        __struct.index = buf.get_u8();
19155        Ok(__struct)
19156    }
19157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19158        let mut __tmp = BytesMut::new(bytes);
19159        #[allow(clippy::absurd_extreme_comparisons)]
19160        #[allow(unused_comparisons)]
19161        if __tmp.remaining() < Self::ENCODED_LEN {
19162            panic!(
19163                "buffer is too small (need {} bytes, but got {})",
19164                Self::ENCODED_LEN,
19165                __tmp.remaining(),
19166            )
19167        }
19168        __tmp.put_f32_le(self.frequency);
19169        __tmp.put_u8(self.index);
19170        if matches!(version, MavlinkVersion::V2) {
19171            let len = __tmp.len();
19172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19173        } else {
19174            __tmp.len()
19175        }
19176    }
19177}
19178#[doc = "id: 20"]
19179#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
19180#[derive(Debug, Clone, PartialEq)]
19181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19183pub struct PARAM_REQUEST_READ_DATA {
19184    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
19185    pub param_index: i16,
19186    #[doc = "System ID"]
19187    pub target_system: u8,
19188    #[doc = "Component ID"]
19189    pub target_component: u8,
19190    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
19191    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19192    pub param_id: [u8; 16],
19193}
19194impl PARAM_REQUEST_READ_DATA {
19195    pub const ENCODED_LEN: usize = 20usize;
19196    pub const DEFAULT: Self = Self {
19197        param_index: 0_i16,
19198        target_system: 0_u8,
19199        target_component: 0_u8,
19200        param_id: [0_u8; 16usize],
19201    };
19202    #[cfg(feature = "arbitrary")]
19203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19204        use arbitrary::{Arbitrary, Unstructured};
19205        let mut buf = [0u8; 1024];
19206        rng.fill_bytes(&mut buf);
19207        let mut unstructured = Unstructured::new(&buf);
19208        Self::arbitrary(&mut unstructured).unwrap_or_default()
19209    }
19210}
19211impl Default for PARAM_REQUEST_READ_DATA {
19212    fn default() -> Self {
19213        Self::DEFAULT.clone()
19214    }
19215}
19216impl MessageData for PARAM_REQUEST_READ_DATA {
19217    type Message = MavMessage;
19218    const ID: u32 = 20u32;
19219    const NAME: &'static str = "PARAM_REQUEST_READ";
19220    const EXTRA_CRC: u8 = 214u8;
19221    const ENCODED_LEN: usize = 20usize;
19222    fn deser(
19223        _version: MavlinkVersion,
19224        __input: &[u8],
19225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19226        let avail_len = __input.len();
19227        let mut payload_buf = [0; Self::ENCODED_LEN];
19228        let mut buf = if avail_len < Self::ENCODED_LEN {
19229            payload_buf[0..avail_len].copy_from_slice(__input);
19230            Bytes::new(&payload_buf)
19231        } else {
19232            Bytes::new(__input)
19233        };
19234        let mut __struct = Self::default();
19235        __struct.param_index = buf.get_i16_le();
19236        __struct.target_system = buf.get_u8();
19237        __struct.target_component = buf.get_u8();
19238        for v in &mut __struct.param_id {
19239            let val = buf.get_u8();
19240            *v = val;
19241        }
19242        Ok(__struct)
19243    }
19244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19245        let mut __tmp = BytesMut::new(bytes);
19246        #[allow(clippy::absurd_extreme_comparisons)]
19247        #[allow(unused_comparisons)]
19248        if __tmp.remaining() < Self::ENCODED_LEN {
19249            panic!(
19250                "buffer is too small (need {} bytes, but got {})",
19251                Self::ENCODED_LEN,
19252                __tmp.remaining(),
19253            )
19254        }
19255        __tmp.put_i16_le(self.param_index);
19256        __tmp.put_u8(self.target_system);
19257        __tmp.put_u8(self.target_component);
19258        for val in &self.param_id {
19259            __tmp.put_u8(*val);
19260        }
19261        if matches!(version, MavlinkVersion::V2) {
19262            let len = __tmp.len();
19263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19264        } else {
19265            __tmp.len()
19266        }
19267    }
19268}
19269#[doc = "id: 263"]
19270#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
19271#[derive(Debug, Clone, PartialEq)]
19272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19274pub struct CAMERA_IMAGE_CAPTURED_DATA {
19275    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
19276    pub time_utc: u64,
19277    #[doc = "Timestamp (time since system boot)."]
19278    pub time_boot_ms: u32,
19279    #[doc = "Latitude where image was taken"]
19280    pub lat: i32,
19281    #[doc = "Longitude where capture was taken"]
19282    pub lon: i32,
19283    #[doc = "Altitude (MSL) where image was taken"]
19284    pub alt: i32,
19285    #[doc = "Altitude above ground"]
19286    pub relative_alt: i32,
19287    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
19288    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19289    pub q: [f32; 4],
19290    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
19291    pub image_index: i32,
19292    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
19293    pub camera_id: u8,
19294    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
19295    pub capture_result: i8,
19296    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
19297    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19298    pub file_url: [u8; 205],
19299}
19300impl CAMERA_IMAGE_CAPTURED_DATA {
19301    pub const ENCODED_LEN: usize = 255usize;
19302    pub const DEFAULT: Self = Self {
19303        time_utc: 0_u64,
19304        time_boot_ms: 0_u32,
19305        lat: 0_i32,
19306        lon: 0_i32,
19307        alt: 0_i32,
19308        relative_alt: 0_i32,
19309        q: [0.0_f32; 4usize],
19310        image_index: 0_i32,
19311        camera_id: 0_u8,
19312        capture_result: 0_i8,
19313        file_url: [0_u8; 205usize],
19314    };
19315    #[cfg(feature = "arbitrary")]
19316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19317        use arbitrary::{Arbitrary, Unstructured};
19318        let mut buf = [0u8; 1024];
19319        rng.fill_bytes(&mut buf);
19320        let mut unstructured = Unstructured::new(&buf);
19321        Self::arbitrary(&mut unstructured).unwrap_or_default()
19322    }
19323}
19324impl Default for CAMERA_IMAGE_CAPTURED_DATA {
19325    fn default() -> Self {
19326        Self::DEFAULT.clone()
19327    }
19328}
19329impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
19330    type Message = MavMessage;
19331    const ID: u32 = 263u32;
19332    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
19333    const EXTRA_CRC: u8 = 133u8;
19334    const ENCODED_LEN: usize = 255usize;
19335    fn deser(
19336        _version: MavlinkVersion,
19337        __input: &[u8],
19338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19339        let avail_len = __input.len();
19340        let mut payload_buf = [0; Self::ENCODED_LEN];
19341        let mut buf = if avail_len < Self::ENCODED_LEN {
19342            payload_buf[0..avail_len].copy_from_slice(__input);
19343            Bytes::new(&payload_buf)
19344        } else {
19345            Bytes::new(__input)
19346        };
19347        let mut __struct = Self::default();
19348        __struct.time_utc = buf.get_u64_le();
19349        __struct.time_boot_ms = buf.get_u32_le();
19350        __struct.lat = buf.get_i32_le();
19351        __struct.lon = buf.get_i32_le();
19352        __struct.alt = buf.get_i32_le();
19353        __struct.relative_alt = buf.get_i32_le();
19354        for v in &mut __struct.q {
19355            let val = buf.get_f32_le();
19356            *v = val;
19357        }
19358        __struct.image_index = buf.get_i32_le();
19359        __struct.camera_id = buf.get_u8();
19360        __struct.capture_result = buf.get_i8();
19361        for v in &mut __struct.file_url {
19362            let val = buf.get_u8();
19363            *v = val;
19364        }
19365        Ok(__struct)
19366    }
19367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19368        let mut __tmp = BytesMut::new(bytes);
19369        #[allow(clippy::absurd_extreme_comparisons)]
19370        #[allow(unused_comparisons)]
19371        if __tmp.remaining() < Self::ENCODED_LEN {
19372            panic!(
19373                "buffer is too small (need {} bytes, but got {})",
19374                Self::ENCODED_LEN,
19375                __tmp.remaining(),
19376            )
19377        }
19378        __tmp.put_u64_le(self.time_utc);
19379        __tmp.put_u32_le(self.time_boot_ms);
19380        __tmp.put_i32_le(self.lat);
19381        __tmp.put_i32_le(self.lon);
19382        __tmp.put_i32_le(self.alt);
19383        __tmp.put_i32_le(self.relative_alt);
19384        for val in &self.q {
19385            __tmp.put_f32_le(*val);
19386        }
19387        __tmp.put_i32_le(self.image_index);
19388        __tmp.put_u8(self.camera_id);
19389        __tmp.put_i8(self.capture_result);
19390        for val in &self.file_url {
19391            __tmp.put_u8(*val);
19392        }
19393        if matches!(version, MavlinkVersion::V2) {
19394            let len = __tmp.len();
19395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19396        } else {
19397            __tmp.len()
19398        }
19399    }
19400}
19401#[doc = "id: 82"]
19402#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
19403#[derive(Debug, Clone, PartialEq)]
19404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19406pub struct SET_ATTITUDE_TARGET_DATA {
19407    #[doc = "Timestamp (time since system boot)."]
19408    pub time_boot_ms: u32,
19409    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
19410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19411    pub q: [f32; 4],
19412    #[doc = "Body roll rate"]
19413    pub body_roll_rate: f32,
19414    #[doc = "Body pitch rate"]
19415    pub body_pitch_rate: f32,
19416    #[doc = "Body yaw rate"]
19417    pub body_yaw_rate: f32,
19418    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
19419    pub thrust: f32,
19420    #[doc = "System ID"]
19421    pub target_system: u8,
19422    #[doc = "Component ID"]
19423    pub target_component: u8,
19424    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
19425    pub type_mask: AttitudeTargetTypemask,
19426    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
19427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19429    pub thrust_body: [f32; 3],
19430}
19431impl SET_ATTITUDE_TARGET_DATA {
19432    pub const ENCODED_LEN: usize = 51usize;
19433    pub const DEFAULT: Self = Self {
19434        time_boot_ms: 0_u32,
19435        q: [0.0_f32; 4usize],
19436        body_roll_rate: 0.0_f32,
19437        body_pitch_rate: 0.0_f32,
19438        body_yaw_rate: 0.0_f32,
19439        thrust: 0.0_f32,
19440        target_system: 0_u8,
19441        target_component: 0_u8,
19442        type_mask: AttitudeTargetTypemask::DEFAULT,
19443        thrust_body: [0.0_f32; 3usize],
19444    };
19445    #[cfg(feature = "arbitrary")]
19446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19447        use arbitrary::{Arbitrary, Unstructured};
19448        let mut buf = [0u8; 1024];
19449        rng.fill_bytes(&mut buf);
19450        let mut unstructured = Unstructured::new(&buf);
19451        Self::arbitrary(&mut unstructured).unwrap_or_default()
19452    }
19453}
19454impl Default for SET_ATTITUDE_TARGET_DATA {
19455    fn default() -> Self {
19456        Self::DEFAULT.clone()
19457    }
19458}
19459impl MessageData for SET_ATTITUDE_TARGET_DATA {
19460    type Message = MavMessage;
19461    const ID: u32 = 82u32;
19462    const NAME: &'static str = "SET_ATTITUDE_TARGET";
19463    const EXTRA_CRC: u8 = 49u8;
19464    const ENCODED_LEN: usize = 51usize;
19465    fn deser(
19466        _version: MavlinkVersion,
19467        __input: &[u8],
19468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19469        let avail_len = __input.len();
19470        let mut payload_buf = [0; Self::ENCODED_LEN];
19471        let mut buf = if avail_len < Self::ENCODED_LEN {
19472            payload_buf[0..avail_len].copy_from_slice(__input);
19473            Bytes::new(&payload_buf)
19474        } else {
19475            Bytes::new(__input)
19476        };
19477        let mut __struct = Self::default();
19478        __struct.time_boot_ms = buf.get_u32_le();
19479        for v in &mut __struct.q {
19480            let val = buf.get_f32_le();
19481            *v = val;
19482        }
19483        __struct.body_roll_rate = buf.get_f32_le();
19484        __struct.body_pitch_rate = buf.get_f32_le();
19485        __struct.body_yaw_rate = buf.get_f32_le();
19486        __struct.thrust = buf.get_f32_le();
19487        __struct.target_system = buf.get_u8();
19488        __struct.target_component = buf.get_u8();
19489        let tmp = buf.get_u8();
19490        __struct.type_mask = AttitudeTargetTypemask::from_bits(
19491            tmp & AttitudeTargetTypemask::all().bits(),
19492        )
19493        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19494            flag_type: "AttitudeTargetTypemask",
19495            value: tmp as u32,
19496        })?;
19497        for v in &mut __struct.thrust_body {
19498            let val = buf.get_f32_le();
19499            *v = val;
19500        }
19501        Ok(__struct)
19502    }
19503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19504        let mut __tmp = BytesMut::new(bytes);
19505        #[allow(clippy::absurd_extreme_comparisons)]
19506        #[allow(unused_comparisons)]
19507        if __tmp.remaining() < Self::ENCODED_LEN {
19508            panic!(
19509                "buffer is too small (need {} bytes, but got {})",
19510                Self::ENCODED_LEN,
19511                __tmp.remaining(),
19512            )
19513        }
19514        __tmp.put_u32_le(self.time_boot_ms);
19515        for val in &self.q {
19516            __tmp.put_f32_le(*val);
19517        }
19518        __tmp.put_f32_le(self.body_roll_rate);
19519        __tmp.put_f32_le(self.body_pitch_rate);
19520        __tmp.put_f32_le(self.body_yaw_rate);
19521        __tmp.put_f32_le(self.thrust);
19522        __tmp.put_u8(self.target_system);
19523        __tmp.put_u8(self.target_component);
19524        __tmp.put_u8(self.type_mask.bits());
19525        for val in &self.thrust_body {
19526            __tmp.put_f32_le(*val);
19527        }
19528        if matches!(version, MavlinkVersion::V2) {
19529            let len = __tmp.len();
19530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19531        } else {
19532            __tmp.len()
19533        }
19534    }
19535}
19536#[doc = "id: 311"]
19537#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
19538#[derive(Debug, Clone, PartialEq)]
19539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19541pub struct UAVCAN_NODE_INFO_DATA {
19542    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19543    pub time_usec: u64,
19544    #[doc = "Time since the start-up of the node."]
19545    pub uptime_sec: u32,
19546    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
19547    pub sw_vcs_commit: u32,
19548    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
19549    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19550    pub name: [u8; 80],
19551    #[doc = "Hardware major version number."]
19552    pub hw_version_major: u8,
19553    #[doc = "Hardware minor version number."]
19554    pub hw_version_minor: u8,
19555    #[doc = "Hardware unique 128-bit ID."]
19556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19557    pub hw_unique_id: [u8; 16],
19558    #[doc = "Software major version number."]
19559    pub sw_version_major: u8,
19560    #[doc = "Software minor version number."]
19561    pub sw_version_minor: u8,
19562}
19563impl UAVCAN_NODE_INFO_DATA {
19564    pub const ENCODED_LEN: usize = 116usize;
19565    pub const DEFAULT: Self = Self {
19566        time_usec: 0_u64,
19567        uptime_sec: 0_u32,
19568        sw_vcs_commit: 0_u32,
19569        name: [0_u8; 80usize],
19570        hw_version_major: 0_u8,
19571        hw_version_minor: 0_u8,
19572        hw_unique_id: [0_u8; 16usize],
19573        sw_version_major: 0_u8,
19574        sw_version_minor: 0_u8,
19575    };
19576    #[cfg(feature = "arbitrary")]
19577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19578        use arbitrary::{Arbitrary, Unstructured};
19579        let mut buf = [0u8; 1024];
19580        rng.fill_bytes(&mut buf);
19581        let mut unstructured = Unstructured::new(&buf);
19582        Self::arbitrary(&mut unstructured).unwrap_or_default()
19583    }
19584}
19585impl Default for UAVCAN_NODE_INFO_DATA {
19586    fn default() -> Self {
19587        Self::DEFAULT.clone()
19588    }
19589}
19590impl MessageData for UAVCAN_NODE_INFO_DATA {
19591    type Message = MavMessage;
19592    const ID: u32 = 311u32;
19593    const NAME: &'static str = "UAVCAN_NODE_INFO";
19594    const EXTRA_CRC: u8 = 95u8;
19595    const ENCODED_LEN: usize = 116usize;
19596    fn deser(
19597        _version: MavlinkVersion,
19598        __input: &[u8],
19599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19600        let avail_len = __input.len();
19601        let mut payload_buf = [0; Self::ENCODED_LEN];
19602        let mut buf = if avail_len < Self::ENCODED_LEN {
19603            payload_buf[0..avail_len].copy_from_slice(__input);
19604            Bytes::new(&payload_buf)
19605        } else {
19606            Bytes::new(__input)
19607        };
19608        let mut __struct = Self::default();
19609        __struct.time_usec = buf.get_u64_le();
19610        __struct.uptime_sec = buf.get_u32_le();
19611        __struct.sw_vcs_commit = buf.get_u32_le();
19612        for v in &mut __struct.name {
19613            let val = buf.get_u8();
19614            *v = val;
19615        }
19616        __struct.hw_version_major = buf.get_u8();
19617        __struct.hw_version_minor = buf.get_u8();
19618        for v in &mut __struct.hw_unique_id {
19619            let val = buf.get_u8();
19620            *v = val;
19621        }
19622        __struct.sw_version_major = buf.get_u8();
19623        __struct.sw_version_minor = buf.get_u8();
19624        Ok(__struct)
19625    }
19626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19627        let mut __tmp = BytesMut::new(bytes);
19628        #[allow(clippy::absurd_extreme_comparisons)]
19629        #[allow(unused_comparisons)]
19630        if __tmp.remaining() < Self::ENCODED_LEN {
19631            panic!(
19632                "buffer is too small (need {} bytes, but got {})",
19633                Self::ENCODED_LEN,
19634                __tmp.remaining(),
19635            )
19636        }
19637        __tmp.put_u64_le(self.time_usec);
19638        __tmp.put_u32_le(self.uptime_sec);
19639        __tmp.put_u32_le(self.sw_vcs_commit);
19640        for val in &self.name {
19641            __tmp.put_u8(*val);
19642        }
19643        __tmp.put_u8(self.hw_version_major);
19644        __tmp.put_u8(self.hw_version_minor);
19645        for val in &self.hw_unique_id {
19646            __tmp.put_u8(*val);
19647        }
19648        __tmp.put_u8(self.sw_version_major);
19649        __tmp.put_u8(self.sw_version_minor);
19650        if matches!(version, MavlinkVersion::V2) {
19651            let len = __tmp.len();
19652            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19653        } else {
19654            __tmp.len()
19655        }
19656    }
19657}
19658#[doc = "id: 65"]
19659#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
19660#[derive(Debug, Clone, PartialEq)]
19661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19663pub struct RC_CHANNELS_DATA {
19664    #[doc = "Timestamp (time since system boot)."]
19665    pub time_boot_ms: u32,
19666    #[doc = "RC channel 1 value."]
19667    pub chan1_raw: u16,
19668    #[doc = "RC channel 2 value."]
19669    pub chan2_raw: u16,
19670    #[doc = "RC channel 3 value."]
19671    pub chan3_raw: u16,
19672    #[doc = "RC channel 4 value."]
19673    pub chan4_raw: u16,
19674    #[doc = "RC channel 5 value."]
19675    pub chan5_raw: u16,
19676    #[doc = "RC channel 6 value."]
19677    pub chan6_raw: u16,
19678    #[doc = "RC channel 7 value."]
19679    pub chan7_raw: u16,
19680    #[doc = "RC channel 8 value."]
19681    pub chan8_raw: u16,
19682    #[doc = "RC channel 9 value."]
19683    pub chan9_raw: u16,
19684    #[doc = "RC channel 10 value."]
19685    pub chan10_raw: u16,
19686    #[doc = "RC channel 11 value."]
19687    pub chan11_raw: u16,
19688    #[doc = "RC channel 12 value."]
19689    pub chan12_raw: u16,
19690    #[doc = "RC channel 13 value."]
19691    pub chan13_raw: u16,
19692    #[doc = "RC channel 14 value."]
19693    pub chan14_raw: u16,
19694    #[doc = "RC channel 15 value."]
19695    pub chan15_raw: u16,
19696    #[doc = "RC channel 16 value."]
19697    pub chan16_raw: u16,
19698    #[doc = "RC channel 17 value."]
19699    pub chan17_raw: u16,
19700    #[doc = "RC channel 18 value."]
19701    pub chan18_raw: u16,
19702    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
19703    pub chancount: u8,
19704    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
19705    pub rssi: u8,
19706}
19707impl RC_CHANNELS_DATA {
19708    pub const ENCODED_LEN: usize = 42usize;
19709    pub const DEFAULT: Self = Self {
19710        time_boot_ms: 0_u32,
19711        chan1_raw: 0_u16,
19712        chan2_raw: 0_u16,
19713        chan3_raw: 0_u16,
19714        chan4_raw: 0_u16,
19715        chan5_raw: 0_u16,
19716        chan6_raw: 0_u16,
19717        chan7_raw: 0_u16,
19718        chan8_raw: 0_u16,
19719        chan9_raw: 0_u16,
19720        chan10_raw: 0_u16,
19721        chan11_raw: 0_u16,
19722        chan12_raw: 0_u16,
19723        chan13_raw: 0_u16,
19724        chan14_raw: 0_u16,
19725        chan15_raw: 0_u16,
19726        chan16_raw: 0_u16,
19727        chan17_raw: 0_u16,
19728        chan18_raw: 0_u16,
19729        chancount: 0_u8,
19730        rssi: 0_u8,
19731    };
19732    #[cfg(feature = "arbitrary")]
19733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19734        use arbitrary::{Arbitrary, Unstructured};
19735        let mut buf = [0u8; 1024];
19736        rng.fill_bytes(&mut buf);
19737        let mut unstructured = Unstructured::new(&buf);
19738        Self::arbitrary(&mut unstructured).unwrap_or_default()
19739    }
19740}
19741impl Default for RC_CHANNELS_DATA {
19742    fn default() -> Self {
19743        Self::DEFAULT.clone()
19744    }
19745}
19746impl MessageData for RC_CHANNELS_DATA {
19747    type Message = MavMessage;
19748    const ID: u32 = 65u32;
19749    const NAME: &'static str = "RC_CHANNELS";
19750    const EXTRA_CRC: u8 = 118u8;
19751    const ENCODED_LEN: usize = 42usize;
19752    fn deser(
19753        _version: MavlinkVersion,
19754        __input: &[u8],
19755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19756        let avail_len = __input.len();
19757        let mut payload_buf = [0; Self::ENCODED_LEN];
19758        let mut buf = if avail_len < Self::ENCODED_LEN {
19759            payload_buf[0..avail_len].copy_from_slice(__input);
19760            Bytes::new(&payload_buf)
19761        } else {
19762            Bytes::new(__input)
19763        };
19764        let mut __struct = Self::default();
19765        __struct.time_boot_ms = buf.get_u32_le();
19766        __struct.chan1_raw = buf.get_u16_le();
19767        __struct.chan2_raw = buf.get_u16_le();
19768        __struct.chan3_raw = buf.get_u16_le();
19769        __struct.chan4_raw = buf.get_u16_le();
19770        __struct.chan5_raw = buf.get_u16_le();
19771        __struct.chan6_raw = buf.get_u16_le();
19772        __struct.chan7_raw = buf.get_u16_le();
19773        __struct.chan8_raw = buf.get_u16_le();
19774        __struct.chan9_raw = buf.get_u16_le();
19775        __struct.chan10_raw = buf.get_u16_le();
19776        __struct.chan11_raw = buf.get_u16_le();
19777        __struct.chan12_raw = buf.get_u16_le();
19778        __struct.chan13_raw = buf.get_u16_le();
19779        __struct.chan14_raw = buf.get_u16_le();
19780        __struct.chan15_raw = buf.get_u16_le();
19781        __struct.chan16_raw = buf.get_u16_le();
19782        __struct.chan17_raw = buf.get_u16_le();
19783        __struct.chan18_raw = buf.get_u16_le();
19784        __struct.chancount = buf.get_u8();
19785        __struct.rssi = buf.get_u8();
19786        Ok(__struct)
19787    }
19788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19789        let mut __tmp = BytesMut::new(bytes);
19790        #[allow(clippy::absurd_extreme_comparisons)]
19791        #[allow(unused_comparisons)]
19792        if __tmp.remaining() < Self::ENCODED_LEN {
19793            panic!(
19794                "buffer is too small (need {} bytes, but got {})",
19795                Self::ENCODED_LEN,
19796                __tmp.remaining(),
19797            )
19798        }
19799        __tmp.put_u32_le(self.time_boot_ms);
19800        __tmp.put_u16_le(self.chan1_raw);
19801        __tmp.put_u16_le(self.chan2_raw);
19802        __tmp.put_u16_le(self.chan3_raw);
19803        __tmp.put_u16_le(self.chan4_raw);
19804        __tmp.put_u16_le(self.chan5_raw);
19805        __tmp.put_u16_le(self.chan6_raw);
19806        __tmp.put_u16_le(self.chan7_raw);
19807        __tmp.put_u16_le(self.chan8_raw);
19808        __tmp.put_u16_le(self.chan9_raw);
19809        __tmp.put_u16_le(self.chan10_raw);
19810        __tmp.put_u16_le(self.chan11_raw);
19811        __tmp.put_u16_le(self.chan12_raw);
19812        __tmp.put_u16_le(self.chan13_raw);
19813        __tmp.put_u16_le(self.chan14_raw);
19814        __tmp.put_u16_le(self.chan15_raw);
19815        __tmp.put_u16_le(self.chan16_raw);
19816        __tmp.put_u16_le(self.chan17_raw);
19817        __tmp.put_u16_le(self.chan18_raw);
19818        __tmp.put_u8(self.chancount);
19819        __tmp.put_u8(self.rssi);
19820        if matches!(version, MavlinkVersion::V2) {
19821            let len = __tmp.len();
19822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19823        } else {
19824            __tmp.len()
19825        }
19826    }
19827}
19828#[doc = "id: 24"]
19829#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
19830#[derive(Debug, Clone, PartialEq)]
19831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19833pub struct GPS_RAW_INT_DATA {
19834    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19835    pub time_usec: u64,
19836    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
19837    pub lat: i32,
19838    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
19839    pub lon: i32,
19840    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
19841    pub alt: i32,
19842    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
19843    pub eph: u16,
19844    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
19845    pub epv: u16,
19846    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
19847    pub vel: u16,
19848    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
19849    pub cog: u16,
19850    #[doc = "GPS fix type."]
19851    pub fix_type: GpsFixType,
19852    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
19853    pub satellites_visible: u8,
19854    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
19855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19856    pub alt_ellipsoid: i32,
19857    #[doc = "Position uncertainty."]
19858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19859    pub h_acc: u32,
19860    #[doc = "Altitude uncertainty."]
19861    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19862    pub v_acc: u32,
19863    #[doc = "Speed uncertainty."]
19864    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19865    pub vel_acc: u32,
19866    #[doc = "Heading / track uncertainty"]
19867    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19868    pub hdg_acc: u32,
19869    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
19870    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19871    pub yaw: u16,
19872}
19873impl GPS_RAW_INT_DATA {
19874    pub const ENCODED_LEN: usize = 52usize;
19875    pub const DEFAULT: Self = Self {
19876        time_usec: 0_u64,
19877        lat: 0_i32,
19878        lon: 0_i32,
19879        alt: 0_i32,
19880        eph: 0_u16,
19881        epv: 0_u16,
19882        vel: 0_u16,
19883        cog: 0_u16,
19884        fix_type: GpsFixType::DEFAULT,
19885        satellites_visible: 0_u8,
19886        alt_ellipsoid: 0_i32,
19887        h_acc: 0_u32,
19888        v_acc: 0_u32,
19889        vel_acc: 0_u32,
19890        hdg_acc: 0_u32,
19891        yaw: 0_u16,
19892    };
19893    #[cfg(feature = "arbitrary")]
19894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19895        use arbitrary::{Arbitrary, Unstructured};
19896        let mut buf = [0u8; 1024];
19897        rng.fill_bytes(&mut buf);
19898        let mut unstructured = Unstructured::new(&buf);
19899        Self::arbitrary(&mut unstructured).unwrap_or_default()
19900    }
19901}
19902impl Default for GPS_RAW_INT_DATA {
19903    fn default() -> Self {
19904        Self::DEFAULT.clone()
19905    }
19906}
19907impl MessageData for GPS_RAW_INT_DATA {
19908    type Message = MavMessage;
19909    const ID: u32 = 24u32;
19910    const NAME: &'static str = "GPS_RAW_INT";
19911    const EXTRA_CRC: u8 = 24u8;
19912    const ENCODED_LEN: usize = 52usize;
19913    fn deser(
19914        _version: MavlinkVersion,
19915        __input: &[u8],
19916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19917        let avail_len = __input.len();
19918        let mut payload_buf = [0; Self::ENCODED_LEN];
19919        let mut buf = if avail_len < Self::ENCODED_LEN {
19920            payload_buf[0..avail_len].copy_from_slice(__input);
19921            Bytes::new(&payload_buf)
19922        } else {
19923            Bytes::new(__input)
19924        };
19925        let mut __struct = Self::default();
19926        __struct.time_usec = buf.get_u64_le();
19927        __struct.lat = buf.get_i32_le();
19928        __struct.lon = buf.get_i32_le();
19929        __struct.alt = buf.get_i32_le();
19930        __struct.eph = buf.get_u16_le();
19931        __struct.epv = buf.get_u16_le();
19932        __struct.vel = buf.get_u16_le();
19933        __struct.cog = buf.get_u16_le();
19934        let tmp = buf.get_u8();
19935        __struct.fix_type =
19936            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19937                enum_type: "GpsFixType",
19938                value: tmp as u32,
19939            })?;
19940        __struct.satellites_visible = buf.get_u8();
19941        __struct.alt_ellipsoid = buf.get_i32_le();
19942        __struct.h_acc = buf.get_u32_le();
19943        __struct.v_acc = buf.get_u32_le();
19944        __struct.vel_acc = buf.get_u32_le();
19945        __struct.hdg_acc = buf.get_u32_le();
19946        __struct.yaw = buf.get_u16_le();
19947        Ok(__struct)
19948    }
19949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19950        let mut __tmp = BytesMut::new(bytes);
19951        #[allow(clippy::absurd_extreme_comparisons)]
19952        #[allow(unused_comparisons)]
19953        if __tmp.remaining() < Self::ENCODED_LEN {
19954            panic!(
19955                "buffer is too small (need {} bytes, but got {})",
19956                Self::ENCODED_LEN,
19957                __tmp.remaining(),
19958            )
19959        }
19960        __tmp.put_u64_le(self.time_usec);
19961        __tmp.put_i32_le(self.lat);
19962        __tmp.put_i32_le(self.lon);
19963        __tmp.put_i32_le(self.alt);
19964        __tmp.put_u16_le(self.eph);
19965        __tmp.put_u16_le(self.epv);
19966        __tmp.put_u16_le(self.vel);
19967        __tmp.put_u16_le(self.cog);
19968        __tmp.put_u8(self.fix_type as u8);
19969        __tmp.put_u8(self.satellites_visible);
19970        __tmp.put_i32_le(self.alt_ellipsoid);
19971        __tmp.put_u32_le(self.h_acc);
19972        __tmp.put_u32_le(self.v_acc);
19973        __tmp.put_u32_le(self.vel_acc);
19974        __tmp.put_u32_le(self.hdg_acc);
19975        __tmp.put_u16_le(self.yaw);
19976        if matches!(version, MavlinkVersion::V2) {
19977            let len = __tmp.len();
19978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19979        } else {
19980            __tmp.len()
19981        }
19982    }
19983}
19984#[doc = "id: 286"]
19985#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
19986#[derive(Debug, Clone, PartialEq)]
19987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19989pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
19990    #[doc = "Timestamp (time since system boot)."]
19991    pub time_boot_us: u64,
19992    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
19993    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19994    pub q: [f32; 4],
19995    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
19996    pub q_estimated_delay_us: u32,
19997    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
19998    pub vx: f32,
19999    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
20000    pub vy: f32,
20001    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
20002    pub vz: f32,
20003    #[doc = "Estimated delay of the speed data. 0 if unknown."]
20004    pub v_estimated_delay_us: u32,
20005    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
20006    pub feed_forward_angular_velocity_z: f32,
20007    #[doc = "Bitmap indicating which estimator outputs are valid."]
20008    pub estimator_status: EstimatorStatusFlags,
20009    #[doc = "System ID"]
20010    pub target_system: u8,
20011    #[doc = "Component ID"]
20012    pub target_component: u8,
20013    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
20014    pub landed_state: MavLandedState,
20015    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
20016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20017    pub angular_velocity_z: f32,
20018}
20019impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
20020    pub const ENCODED_LEN: usize = 57usize;
20021    pub const DEFAULT: Self = Self {
20022        time_boot_us: 0_u64,
20023        q: [0.0_f32; 4usize],
20024        q_estimated_delay_us: 0_u32,
20025        vx: 0.0_f32,
20026        vy: 0.0_f32,
20027        vz: 0.0_f32,
20028        v_estimated_delay_us: 0_u32,
20029        feed_forward_angular_velocity_z: 0.0_f32,
20030        estimator_status: EstimatorStatusFlags::DEFAULT,
20031        target_system: 0_u8,
20032        target_component: 0_u8,
20033        landed_state: MavLandedState::DEFAULT,
20034        angular_velocity_z: 0.0_f32,
20035    };
20036    #[cfg(feature = "arbitrary")]
20037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20038        use arbitrary::{Arbitrary, Unstructured};
20039        let mut buf = [0u8; 1024];
20040        rng.fill_bytes(&mut buf);
20041        let mut unstructured = Unstructured::new(&buf);
20042        Self::arbitrary(&mut unstructured).unwrap_or_default()
20043    }
20044}
20045impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
20046    fn default() -> Self {
20047        Self::DEFAULT.clone()
20048    }
20049}
20050impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
20051    type Message = MavMessage;
20052    const ID: u32 = 286u32;
20053    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
20054    const EXTRA_CRC: u8 = 210u8;
20055    const ENCODED_LEN: usize = 57usize;
20056    fn deser(
20057        _version: MavlinkVersion,
20058        __input: &[u8],
20059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20060        let avail_len = __input.len();
20061        let mut payload_buf = [0; Self::ENCODED_LEN];
20062        let mut buf = if avail_len < Self::ENCODED_LEN {
20063            payload_buf[0..avail_len].copy_from_slice(__input);
20064            Bytes::new(&payload_buf)
20065        } else {
20066            Bytes::new(__input)
20067        };
20068        let mut __struct = Self::default();
20069        __struct.time_boot_us = buf.get_u64_le();
20070        for v in &mut __struct.q {
20071            let val = buf.get_f32_le();
20072            *v = val;
20073        }
20074        __struct.q_estimated_delay_us = buf.get_u32_le();
20075        __struct.vx = buf.get_f32_le();
20076        __struct.vy = buf.get_f32_le();
20077        __struct.vz = buf.get_f32_le();
20078        __struct.v_estimated_delay_us = buf.get_u32_le();
20079        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
20080        let tmp = buf.get_u16_le();
20081        __struct.estimator_status = EstimatorStatusFlags::from_bits(
20082            tmp & EstimatorStatusFlags::all().bits(),
20083        )
20084        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20085            flag_type: "EstimatorStatusFlags",
20086            value: tmp as u32,
20087        })?;
20088        __struct.target_system = buf.get_u8();
20089        __struct.target_component = buf.get_u8();
20090        let tmp = buf.get_u8();
20091        __struct.landed_state =
20092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20093                enum_type: "MavLandedState",
20094                value: tmp as u32,
20095            })?;
20096        __struct.angular_velocity_z = buf.get_f32_le();
20097        Ok(__struct)
20098    }
20099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20100        let mut __tmp = BytesMut::new(bytes);
20101        #[allow(clippy::absurd_extreme_comparisons)]
20102        #[allow(unused_comparisons)]
20103        if __tmp.remaining() < Self::ENCODED_LEN {
20104            panic!(
20105                "buffer is too small (need {} bytes, but got {})",
20106                Self::ENCODED_LEN,
20107                __tmp.remaining(),
20108            )
20109        }
20110        __tmp.put_u64_le(self.time_boot_us);
20111        for val in &self.q {
20112            __tmp.put_f32_le(*val);
20113        }
20114        __tmp.put_u32_le(self.q_estimated_delay_us);
20115        __tmp.put_f32_le(self.vx);
20116        __tmp.put_f32_le(self.vy);
20117        __tmp.put_f32_le(self.vz);
20118        __tmp.put_u32_le(self.v_estimated_delay_us);
20119        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
20120        __tmp.put_u16_le(self.estimator_status.bits());
20121        __tmp.put_u8(self.target_system);
20122        __tmp.put_u8(self.target_component);
20123        __tmp.put_u8(self.landed_state as u8);
20124        __tmp.put_f32_le(self.angular_velocity_z);
20125        if matches!(version, MavlinkVersion::V2) {
20126            let len = __tmp.len();
20127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20128        } else {
20129            __tmp.len()
20130        }
20131    }
20132}
20133#[doc = "id: 8014"]
20134#[doc = "Status of GSM modem (connected to onboard computer)."]
20135#[derive(Debug, Clone, PartialEq)]
20136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20138pub struct GSM_LINK_STATUS_DATA {
20139    #[doc = "Timestamp (of OBC)"]
20140    pub timestamp: u64,
20141    #[doc = "GSM modem used"]
20142    pub gsm_modem_type: GsmModemType,
20143    #[doc = "GSM link type"]
20144    pub gsm_link_type: GsmLinkType,
20145    #[doc = "RSSI as reported by modem (unconverted)"]
20146    pub rssi: u8,
20147    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
20148    pub rsrp_rscp: u8,
20149    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
20150    pub sinr_ecio: u8,
20151    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
20152    pub rsrq: u8,
20153}
20154impl GSM_LINK_STATUS_DATA {
20155    pub const ENCODED_LEN: usize = 14usize;
20156    pub const DEFAULT: Self = Self {
20157        timestamp: 0_u64,
20158        gsm_modem_type: GsmModemType::DEFAULT,
20159        gsm_link_type: GsmLinkType::DEFAULT,
20160        rssi: 0_u8,
20161        rsrp_rscp: 0_u8,
20162        sinr_ecio: 0_u8,
20163        rsrq: 0_u8,
20164    };
20165    #[cfg(feature = "arbitrary")]
20166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20167        use arbitrary::{Arbitrary, Unstructured};
20168        let mut buf = [0u8; 1024];
20169        rng.fill_bytes(&mut buf);
20170        let mut unstructured = Unstructured::new(&buf);
20171        Self::arbitrary(&mut unstructured).unwrap_or_default()
20172    }
20173}
20174impl Default for GSM_LINK_STATUS_DATA {
20175    fn default() -> Self {
20176        Self::DEFAULT.clone()
20177    }
20178}
20179impl MessageData for GSM_LINK_STATUS_DATA {
20180    type Message = MavMessage;
20181    const ID: u32 = 8014u32;
20182    const NAME: &'static str = "GSM_LINK_STATUS";
20183    const EXTRA_CRC: u8 = 200u8;
20184    const ENCODED_LEN: usize = 14usize;
20185    fn deser(
20186        _version: MavlinkVersion,
20187        __input: &[u8],
20188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20189        let avail_len = __input.len();
20190        let mut payload_buf = [0; Self::ENCODED_LEN];
20191        let mut buf = if avail_len < Self::ENCODED_LEN {
20192            payload_buf[0..avail_len].copy_from_slice(__input);
20193            Bytes::new(&payload_buf)
20194        } else {
20195            Bytes::new(__input)
20196        };
20197        let mut __struct = Self::default();
20198        __struct.timestamp = buf.get_u64_le();
20199        let tmp = buf.get_u8();
20200        __struct.gsm_modem_type =
20201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20202                enum_type: "GsmModemType",
20203                value: tmp as u32,
20204            })?;
20205        let tmp = buf.get_u8();
20206        __struct.gsm_link_type =
20207            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20208                enum_type: "GsmLinkType",
20209                value: tmp as u32,
20210            })?;
20211        __struct.rssi = buf.get_u8();
20212        __struct.rsrp_rscp = buf.get_u8();
20213        __struct.sinr_ecio = buf.get_u8();
20214        __struct.rsrq = buf.get_u8();
20215        Ok(__struct)
20216    }
20217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20218        let mut __tmp = BytesMut::new(bytes);
20219        #[allow(clippy::absurd_extreme_comparisons)]
20220        #[allow(unused_comparisons)]
20221        if __tmp.remaining() < Self::ENCODED_LEN {
20222            panic!(
20223                "buffer is too small (need {} bytes, but got {})",
20224                Self::ENCODED_LEN,
20225                __tmp.remaining(),
20226            )
20227        }
20228        __tmp.put_u64_le(self.timestamp);
20229        __tmp.put_u8(self.gsm_modem_type as u8);
20230        __tmp.put_u8(self.gsm_link_type as u8);
20231        __tmp.put_u8(self.rssi);
20232        __tmp.put_u8(self.rsrp_rscp);
20233        __tmp.put_u8(self.sinr_ecio);
20234        __tmp.put_u8(self.rsrq);
20235        if matches!(version, MavlinkVersion::V2) {
20236            let len = __tmp.len();
20237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20238        } else {
20239            __tmp.len()
20240        }
20241    }
20242}
20243#[doc = "id: 340"]
20244#[doc = "The global position resulting from GPS and sensor fusion."]
20245#[derive(Debug, Clone, PartialEq)]
20246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20248pub struct UTM_GLOBAL_POSITION_DATA {
20249    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
20250    pub time: u64,
20251    #[doc = "Latitude (WGS84)"]
20252    pub lat: i32,
20253    #[doc = "Longitude (WGS84)"]
20254    pub lon: i32,
20255    #[doc = "Altitude (WGS84)"]
20256    pub alt: i32,
20257    #[doc = "Altitude above ground"]
20258    pub relative_alt: i32,
20259    #[doc = "Next waypoint, latitude (WGS84)"]
20260    pub next_lat: i32,
20261    #[doc = "Next waypoint, longitude (WGS84)"]
20262    pub next_lon: i32,
20263    #[doc = "Next waypoint, altitude (WGS84)"]
20264    pub next_alt: i32,
20265    #[doc = "Ground X speed (latitude, positive north)"]
20266    pub vx: i16,
20267    #[doc = "Ground Y speed (longitude, positive east)"]
20268    pub vy: i16,
20269    #[doc = "Ground Z speed (altitude, positive down)"]
20270    pub vz: i16,
20271    #[doc = "Horizontal position uncertainty (standard deviation)"]
20272    pub h_acc: u16,
20273    #[doc = "Altitude uncertainty (standard deviation)"]
20274    pub v_acc: u16,
20275    #[doc = "Speed uncertainty (standard deviation)"]
20276    pub vel_acc: u16,
20277    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
20278    pub update_rate: u16,
20279    #[doc = "Unique UAS ID."]
20280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20281    pub uas_id: [u8; 18],
20282    #[doc = "Flight state"]
20283    pub flight_state: UtmFlightState,
20284    #[doc = "Bitwise OR combination of the data available flags."]
20285    pub flags: UtmDataAvailFlags,
20286}
20287impl UTM_GLOBAL_POSITION_DATA {
20288    pub const ENCODED_LEN: usize = 70usize;
20289    pub const DEFAULT: Self = Self {
20290        time: 0_u64,
20291        lat: 0_i32,
20292        lon: 0_i32,
20293        alt: 0_i32,
20294        relative_alt: 0_i32,
20295        next_lat: 0_i32,
20296        next_lon: 0_i32,
20297        next_alt: 0_i32,
20298        vx: 0_i16,
20299        vy: 0_i16,
20300        vz: 0_i16,
20301        h_acc: 0_u16,
20302        v_acc: 0_u16,
20303        vel_acc: 0_u16,
20304        update_rate: 0_u16,
20305        uas_id: [0_u8; 18usize],
20306        flight_state: UtmFlightState::DEFAULT,
20307        flags: UtmDataAvailFlags::DEFAULT,
20308    };
20309    #[cfg(feature = "arbitrary")]
20310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20311        use arbitrary::{Arbitrary, Unstructured};
20312        let mut buf = [0u8; 1024];
20313        rng.fill_bytes(&mut buf);
20314        let mut unstructured = Unstructured::new(&buf);
20315        Self::arbitrary(&mut unstructured).unwrap_or_default()
20316    }
20317}
20318impl Default for UTM_GLOBAL_POSITION_DATA {
20319    fn default() -> Self {
20320        Self::DEFAULT.clone()
20321    }
20322}
20323impl MessageData for UTM_GLOBAL_POSITION_DATA {
20324    type Message = MavMessage;
20325    const ID: u32 = 340u32;
20326    const NAME: &'static str = "UTM_GLOBAL_POSITION";
20327    const EXTRA_CRC: u8 = 99u8;
20328    const ENCODED_LEN: usize = 70usize;
20329    fn deser(
20330        _version: MavlinkVersion,
20331        __input: &[u8],
20332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20333        let avail_len = __input.len();
20334        let mut payload_buf = [0; Self::ENCODED_LEN];
20335        let mut buf = if avail_len < Self::ENCODED_LEN {
20336            payload_buf[0..avail_len].copy_from_slice(__input);
20337            Bytes::new(&payload_buf)
20338        } else {
20339            Bytes::new(__input)
20340        };
20341        let mut __struct = Self::default();
20342        __struct.time = buf.get_u64_le();
20343        __struct.lat = buf.get_i32_le();
20344        __struct.lon = buf.get_i32_le();
20345        __struct.alt = buf.get_i32_le();
20346        __struct.relative_alt = buf.get_i32_le();
20347        __struct.next_lat = buf.get_i32_le();
20348        __struct.next_lon = buf.get_i32_le();
20349        __struct.next_alt = buf.get_i32_le();
20350        __struct.vx = buf.get_i16_le();
20351        __struct.vy = buf.get_i16_le();
20352        __struct.vz = buf.get_i16_le();
20353        __struct.h_acc = buf.get_u16_le();
20354        __struct.v_acc = buf.get_u16_le();
20355        __struct.vel_acc = buf.get_u16_le();
20356        __struct.update_rate = buf.get_u16_le();
20357        for v in &mut __struct.uas_id {
20358            let val = buf.get_u8();
20359            *v = val;
20360        }
20361        let tmp = buf.get_u8();
20362        __struct.flight_state =
20363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20364                enum_type: "UtmFlightState",
20365                value: tmp as u32,
20366            })?;
20367        let tmp = buf.get_u8();
20368        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
20369            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20370                flag_type: "UtmDataAvailFlags",
20371                value: tmp as u32,
20372            })?;
20373        Ok(__struct)
20374    }
20375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20376        let mut __tmp = BytesMut::new(bytes);
20377        #[allow(clippy::absurd_extreme_comparisons)]
20378        #[allow(unused_comparisons)]
20379        if __tmp.remaining() < Self::ENCODED_LEN {
20380            panic!(
20381                "buffer is too small (need {} bytes, but got {})",
20382                Self::ENCODED_LEN,
20383                __tmp.remaining(),
20384            )
20385        }
20386        __tmp.put_u64_le(self.time);
20387        __tmp.put_i32_le(self.lat);
20388        __tmp.put_i32_le(self.lon);
20389        __tmp.put_i32_le(self.alt);
20390        __tmp.put_i32_le(self.relative_alt);
20391        __tmp.put_i32_le(self.next_lat);
20392        __tmp.put_i32_le(self.next_lon);
20393        __tmp.put_i32_le(self.next_alt);
20394        __tmp.put_i16_le(self.vx);
20395        __tmp.put_i16_le(self.vy);
20396        __tmp.put_i16_le(self.vz);
20397        __tmp.put_u16_le(self.h_acc);
20398        __tmp.put_u16_le(self.v_acc);
20399        __tmp.put_u16_le(self.vel_acc);
20400        __tmp.put_u16_le(self.update_rate);
20401        for val in &self.uas_id {
20402            __tmp.put_u8(*val);
20403        }
20404        __tmp.put_u8(self.flight_state as u8);
20405        __tmp.put_u8(self.flags.bits());
20406        if matches!(version, MavlinkVersion::V2) {
20407            let len = __tmp.len();
20408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20409        } else {
20410            __tmp.len()
20411        }
20412    }
20413}
20414#[doc = "id: 105"]
20415#[doc = "The IMU readings in SI units in NED body frame."]
20416#[derive(Debug, Clone, PartialEq)]
20417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20419pub struct HIGHRES_IMU_DATA {
20420    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20421    pub time_usec: u64,
20422    #[doc = "X acceleration"]
20423    pub xacc: f32,
20424    #[doc = "Y acceleration"]
20425    pub yacc: f32,
20426    #[doc = "Z acceleration"]
20427    pub zacc: f32,
20428    #[doc = "Angular speed around X axis"]
20429    pub xgyro: f32,
20430    #[doc = "Angular speed around Y axis"]
20431    pub ygyro: f32,
20432    #[doc = "Angular speed around Z axis"]
20433    pub zgyro: f32,
20434    #[doc = "X Magnetic field"]
20435    pub xmag: f32,
20436    #[doc = "Y Magnetic field"]
20437    pub ymag: f32,
20438    #[doc = "Z Magnetic field"]
20439    pub zmag: f32,
20440    #[doc = "Absolute pressure"]
20441    pub abs_pressure: f32,
20442    #[doc = "Differential pressure"]
20443    pub diff_pressure: f32,
20444    #[doc = "Altitude calculated from pressure"]
20445    pub pressure_alt: f32,
20446    #[doc = "Temperature"]
20447    pub temperature: f32,
20448    #[doc = "Bitmap for fields that have updated since last message"]
20449    pub fields_updated: HighresImuUpdatedFlags,
20450    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
20451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20452    pub id: u8,
20453}
20454impl HIGHRES_IMU_DATA {
20455    pub const ENCODED_LEN: usize = 63usize;
20456    pub const DEFAULT: Self = Self {
20457        time_usec: 0_u64,
20458        xacc: 0.0_f32,
20459        yacc: 0.0_f32,
20460        zacc: 0.0_f32,
20461        xgyro: 0.0_f32,
20462        ygyro: 0.0_f32,
20463        zgyro: 0.0_f32,
20464        xmag: 0.0_f32,
20465        ymag: 0.0_f32,
20466        zmag: 0.0_f32,
20467        abs_pressure: 0.0_f32,
20468        diff_pressure: 0.0_f32,
20469        pressure_alt: 0.0_f32,
20470        temperature: 0.0_f32,
20471        fields_updated: HighresImuUpdatedFlags::DEFAULT,
20472        id: 0_u8,
20473    };
20474    #[cfg(feature = "arbitrary")]
20475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20476        use arbitrary::{Arbitrary, Unstructured};
20477        let mut buf = [0u8; 1024];
20478        rng.fill_bytes(&mut buf);
20479        let mut unstructured = Unstructured::new(&buf);
20480        Self::arbitrary(&mut unstructured).unwrap_or_default()
20481    }
20482}
20483impl Default for HIGHRES_IMU_DATA {
20484    fn default() -> Self {
20485        Self::DEFAULT.clone()
20486    }
20487}
20488impl MessageData for HIGHRES_IMU_DATA {
20489    type Message = MavMessage;
20490    const ID: u32 = 105u32;
20491    const NAME: &'static str = "HIGHRES_IMU";
20492    const EXTRA_CRC: u8 = 93u8;
20493    const ENCODED_LEN: usize = 63usize;
20494    fn deser(
20495        _version: MavlinkVersion,
20496        __input: &[u8],
20497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20498        let avail_len = __input.len();
20499        let mut payload_buf = [0; Self::ENCODED_LEN];
20500        let mut buf = if avail_len < Self::ENCODED_LEN {
20501            payload_buf[0..avail_len].copy_from_slice(__input);
20502            Bytes::new(&payload_buf)
20503        } else {
20504            Bytes::new(__input)
20505        };
20506        let mut __struct = Self::default();
20507        __struct.time_usec = buf.get_u64_le();
20508        __struct.xacc = buf.get_f32_le();
20509        __struct.yacc = buf.get_f32_le();
20510        __struct.zacc = buf.get_f32_le();
20511        __struct.xgyro = buf.get_f32_le();
20512        __struct.ygyro = buf.get_f32_le();
20513        __struct.zgyro = buf.get_f32_le();
20514        __struct.xmag = buf.get_f32_le();
20515        __struct.ymag = buf.get_f32_le();
20516        __struct.zmag = buf.get_f32_le();
20517        __struct.abs_pressure = buf.get_f32_le();
20518        __struct.diff_pressure = buf.get_f32_le();
20519        __struct.pressure_alt = buf.get_f32_le();
20520        __struct.temperature = buf.get_f32_le();
20521        let tmp = buf.get_u16_le();
20522        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
20523            tmp & HighresImuUpdatedFlags::all().bits(),
20524        )
20525        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20526            flag_type: "HighresImuUpdatedFlags",
20527            value: tmp as u32,
20528        })?;
20529        __struct.id = buf.get_u8();
20530        Ok(__struct)
20531    }
20532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20533        let mut __tmp = BytesMut::new(bytes);
20534        #[allow(clippy::absurd_extreme_comparisons)]
20535        #[allow(unused_comparisons)]
20536        if __tmp.remaining() < Self::ENCODED_LEN {
20537            panic!(
20538                "buffer is too small (need {} bytes, but got {})",
20539                Self::ENCODED_LEN,
20540                __tmp.remaining(),
20541            )
20542        }
20543        __tmp.put_u64_le(self.time_usec);
20544        __tmp.put_f32_le(self.xacc);
20545        __tmp.put_f32_le(self.yacc);
20546        __tmp.put_f32_le(self.zacc);
20547        __tmp.put_f32_le(self.xgyro);
20548        __tmp.put_f32_le(self.ygyro);
20549        __tmp.put_f32_le(self.zgyro);
20550        __tmp.put_f32_le(self.xmag);
20551        __tmp.put_f32_le(self.ymag);
20552        __tmp.put_f32_le(self.zmag);
20553        __tmp.put_f32_le(self.abs_pressure);
20554        __tmp.put_f32_le(self.diff_pressure);
20555        __tmp.put_f32_le(self.pressure_alt);
20556        __tmp.put_f32_le(self.temperature);
20557        __tmp.put_u16_le(self.fields_updated.bits());
20558        __tmp.put_u8(self.id);
20559        if matches!(version, MavlinkVersion::V2) {
20560            let len = __tmp.len();
20561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20562        } else {
20563            __tmp.len()
20564        }
20565    }
20566}
20567#[doc = "id: 282"]
20568#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
20569#[derive(Debug, Clone, PartialEq)]
20570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20572pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
20573    #[doc = "High level gimbal manager flags to use."]
20574    pub flags: GimbalManagerFlags,
20575    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
20576    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20577    pub q: [f32; 4],
20578    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
20579    pub angular_velocity_x: f32,
20580    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
20581    pub angular_velocity_y: f32,
20582    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
20583    pub angular_velocity_z: f32,
20584    #[doc = "System ID"]
20585    pub target_system: u8,
20586    #[doc = "Component ID"]
20587    pub target_component: u8,
20588    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
20589    pub gimbal_device_id: u8,
20590}
20591impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
20592    pub const ENCODED_LEN: usize = 35usize;
20593    pub const DEFAULT: Self = Self {
20594        flags: GimbalManagerFlags::DEFAULT,
20595        q: [0.0_f32; 4usize],
20596        angular_velocity_x: 0.0_f32,
20597        angular_velocity_y: 0.0_f32,
20598        angular_velocity_z: 0.0_f32,
20599        target_system: 0_u8,
20600        target_component: 0_u8,
20601        gimbal_device_id: 0_u8,
20602    };
20603    #[cfg(feature = "arbitrary")]
20604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20605        use arbitrary::{Arbitrary, Unstructured};
20606        let mut buf = [0u8; 1024];
20607        rng.fill_bytes(&mut buf);
20608        let mut unstructured = Unstructured::new(&buf);
20609        Self::arbitrary(&mut unstructured).unwrap_or_default()
20610    }
20611}
20612impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
20613    fn default() -> Self {
20614        Self::DEFAULT.clone()
20615    }
20616}
20617impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
20618    type Message = MavMessage;
20619    const ID: u32 = 282u32;
20620    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
20621    const EXTRA_CRC: u8 = 123u8;
20622    const ENCODED_LEN: usize = 35usize;
20623    fn deser(
20624        _version: MavlinkVersion,
20625        __input: &[u8],
20626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20627        let avail_len = __input.len();
20628        let mut payload_buf = [0; Self::ENCODED_LEN];
20629        let mut buf = if avail_len < Self::ENCODED_LEN {
20630            payload_buf[0..avail_len].copy_from_slice(__input);
20631            Bytes::new(&payload_buf)
20632        } else {
20633            Bytes::new(__input)
20634        };
20635        let mut __struct = Self::default();
20636        let tmp = buf.get_u32_le();
20637        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
20638            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20639                flag_type: "GimbalManagerFlags",
20640                value: tmp as u32,
20641            })?;
20642        for v in &mut __struct.q {
20643            let val = buf.get_f32_le();
20644            *v = val;
20645        }
20646        __struct.angular_velocity_x = buf.get_f32_le();
20647        __struct.angular_velocity_y = buf.get_f32_le();
20648        __struct.angular_velocity_z = buf.get_f32_le();
20649        __struct.target_system = buf.get_u8();
20650        __struct.target_component = buf.get_u8();
20651        __struct.gimbal_device_id = buf.get_u8();
20652        Ok(__struct)
20653    }
20654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20655        let mut __tmp = BytesMut::new(bytes);
20656        #[allow(clippy::absurd_extreme_comparisons)]
20657        #[allow(unused_comparisons)]
20658        if __tmp.remaining() < Self::ENCODED_LEN {
20659            panic!(
20660                "buffer is too small (need {} bytes, but got {})",
20661                Self::ENCODED_LEN,
20662                __tmp.remaining(),
20663            )
20664        }
20665        __tmp.put_u32_le(self.flags.bits());
20666        for val in &self.q {
20667            __tmp.put_f32_le(*val);
20668        }
20669        __tmp.put_f32_le(self.angular_velocity_x);
20670        __tmp.put_f32_le(self.angular_velocity_y);
20671        __tmp.put_f32_le(self.angular_velocity_z);
20672        __tmp.put_u8(self.target_system);
20673        __tmp.put_u8(self.target_component);
20674        __tmp.put_u8(self.gimbal_device_id);
20675        if matches!(version, MavlinkVersion::V2) {
20676            let len = __tmp.len();
20677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20678        } else {
20679            __tmp.len()
20680        }
20681    }
20682}
20683#[doc = "id: 310"]
20684#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
20685#[derive(Debug, Clone, PartialEq)]
20686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20688pub struct UAVCAN_NODE_STATUS_DATA {
20689    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20690    pub time_usec: u64,
20691    #[doc = "Time since the start-up of the node."]
20692    pub uptime_sec: u32,
20693    #[doc = "Vendor-specific status information."]
20694    pub vendor_specific_status_code: u16,
20695    #[doc = "Generalized node health status."]
20696    pub health: UavcanNodeHealth,
20697    #[doc = "Generalized operating mode."]
20698    pub mode: UavcanNodeMode,
20699    #[doc = "Not used currently."]
20700    pub sub_mode: u8,
20701}
20702impl UAVCAN_NODE_STATUS_DATA {
20703    pub const ENCODED_LEN: usize = 17usize;
20704    pub const DEFAULT: Self = Self {
20705        time_usec: 0_u64,
20706        uptime_sec: 0_u32,
20707        vendor_specific_status_code: 0_u16,
20708        health: UavcanNodeHealth::DEFAULT,
20709        mode: UavcanNodeMode::DEFAULT,
20710        sub_mode: 0_u8,
20711    };
20712    #[cfg(feature = "arbitrary")]
20713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20714        use arbitrary::{Arbitrary, Unstructured};
20715        let mut buf = [0u8; 1024];
20716        rng.fill_bytes(&mut buf);
20717        let mut unstructured = Unstructured::new(&buf);
20718        Self::arbitrary(&mut unstructured).unwrap_or_default()
20719    }
20720}
20721impl Default for UAVCAN_NODE_STATUS_DATA {
20722    fn default() -> Self {
20723        Self::DEFAULT.clone()
20724    }
20725}
20726impl MessageData for UAVCAN_NODE_STATUS_DATA {
20727    type Message = MavMessage;
20728    const ID: u32 = 310u32;
20729    const NAME: &'static str = "UAVCAN_NODE_STATUS";
20730    const EXTRA_CRC: u8 = 28u8;
20731    const ENCODED_LEN: usize = 17usize;
20732    fn deser(
20733        _version: MavlinkVersion,
20734        __input: &[u8],
20735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20736        let avail_len = __input.len();
20737        let mut payload_buf = [0; Self::ENCODED_LEN];
20738        let mut buf = if avail_len < Self::ENCODED_LEN {
20739            payload_buf[0..avail_len].copy_from_slice(__input);
20740            Bytes::new(&payload_buf)
20741        } else {
20742            Bytes::new(__input)
20743        };
20744        let mut __struct = Self::default();
20745        __struct.time_usec = buf.get_u64_le();
20746        __struct.uptime_sec = buf.get_u32_le();
20747        __struct.vendor_specific_status_code = buf.get_u16_le();
20748        let tmp = buf.get_u8();
20749        __struct.health =
20750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20751                enum_type: "UavcanNodeHealth",
20752                value: tmp as u32,
20753            })?;
20754        let tmp = buf.get_u8();
20755        __struct.mode =
20756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20757                enum_type: "UavcanNodeMode",
20758                value: tmp as u32,
20759            })?;
20760        __struct.sub_mode = buf.get_u8();
20761        Ok(__struct)
20762    }
20763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20764        let mut __tmp = BytesMut::new(bytes);
20765        #[allow(clippy::absurd_extreme_comparisons)]
20766        #[allow(unused_comparisons)]
20767        if __tmp.remaining() < Self::ENCODED_LEN {
20768            panic!(
20769                "buffer is too small (need {} bytes, but got {})",
20770                Self::ENCODED_LEN,
20771                __tmp.remaining(),
20772            )
20773        }
20774        __tmp.put_u64_le(self.time_usec);
20775        __tmp.put_u32_le(self.uptime_sec);
20776        __tmp.put_u16_le(self.vendor_specific_status_code);
20777        __tmp.put_u8(self.health as u8);
20778        __tmp.put_u8(self.mode as u8);
20779        __tmp.put_u8(self.sub_mode);
20780        if matches!(version, MavlinkVersion::V2) {
20781            let len = __tmp.len();
20782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20783        } else {
20784            __tmp.len()
20785        }
20786    }
20787}
20788#[doc = "id: 92"]
20789#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
20790#[derive(Debug, Clone, PartialEq)]
20791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20793pub struct HIL_RC_INPUTS_RAW_DATA {
20794    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20795    pub time_usec: u64,
20796    #[doc = "RC channel 1 value"]
20797    pub chan1_raw: u16,
20798    #[doc = "RC channel 2 value"]
20799    pub chan2_raw: u16,
20800    #[doc = "RC channel 3 value"]
20801    pub chan3_raw: u16,
20802    #[doc = "RC channel 4 value"]
20803    pub chan4_raw: u16,
20804    #[doc = "RC channel 5 value"]
20805    pub chan5_raw: u16,
20806    #[doc = "RC channel 6 value"]
20807    pub chan6_raw: u16,
20808    #[doc = "RC channel 7 value"]
20809    pub chan7_raw: u16,
20810    #[doc = "RC channel 8 value"]
20811    pub chan8_raw: u16,
20812    #[doc = "RC channel 9 value"]
20813    pub chan9_raw: u16,
20814    #[doc = "RC channel 10 value"]
20815    pub chan10_raw: u16,
20816    #[doc = "RC channel 11 value"]
20817    pub chan11_raw: u16,
20818    #[doc = "RC channel 12 value"]
20819    pub chan12_raw: u16,
20820    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
20821    pub rssi: u8,
20822}
20823impl HIL_RC_INPUTS_RAW_DATA {
20824    pub const ENCODED_LEN: usize = 33usize;
20825    pub const DEFAULT: Self = Self {
20826        time_usec: 0_u64,
20827        chan1_raw: 0_u16,
20828        chan2_raw: 0_u16,
20829        chan3_raw: 0_u16,
20830        chan4_raw: 0_u16,
20831        chan5_raw: 0_u16,
20832        chan6_raw: 0_u16,
20833        chan7_raw: 0_u16,
20834        chan8_raw: 0_u16,
20835        chan9_raw: 0_u16,
20836        chan10_raw: 0_u16,
20837        chan11_raw: 0_u16,
20838        chan12_raw: 0_u16,
20839        rssi: 0_u8,
20840    };
20841    #[cfg(feature = "arbitrary")]
20842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20843        use arbitrary::{Arbitrary, Unstructured};
20844        let mut buf = [0u8; 1024];
20845        rng.fill_bytes(&mut buf);
20846        let mut unstructured = Unstructured::new(&buf);
20847        Self::arbitrary(&mut unstructured).unwrap_or_default()
20848    }
20849}
20850impl Default for HIL_RC_INPUTS_RAW_DATA {
20851    fn default() -> Self {
20852        Self::DEFAULT.clone()
20853    }
20854}
20855impl MessageData for HIL_RC_INPUTS_RAW_DATA {
20856    type Message = MavMessage;
20857    const ID: u32 = 92u32;
20858    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
20859    const EXTRA_CRC: u8 = 54u8;
20860    const ENCODED_LEN: usize = 33usize;
20861    fn deser(
20862        _version: MavlinkVersion,
20863        __input: &[u8],
20864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20865        let avail_len = __input.len();
20866        let mut payload_buf = [0; Self::ENCODED_LEN];
20867        let mut buf = if avail_len < Self::ENCODED_LEN {
20868            payload_buf[0..avail_len].copy_from_slice(__input);
20869            Bytes::new(&payload_buf)
20870        } else {
20871            Bytes::new(__input)
20872        };
20873        let mut __struct = Self::default();
20874        __struct.time_usec = buf.get_u64_le();
20875        __struct.chan1_raw = buf.get_u16_le();
20876        __struct.chan2_raw = buf.get_u16_le();
20877        __struct.chan3_raw = buf.get_u16_le();
20878        __struct.chan4_raw = buf.get_u16_le();
20879        __struct.chan5_raw = buf.get_u16_le();
20880        __struct.chan6_raw = buf.get_u16_le();
20881        __struct.chan7_raw = buf.get_u16_le();
20882        __struct.chan8_raw = buf.get_u16_le();
20883        __struct.chan9_raw = buf.get_u16_le();
20884        __struct.chan10_raw = buf.get_u16_le();
20885        __struct.chan11_raw = buf.get_u16_le();
20886        __struct.chan12_raw = buf.get_u16_le();
20887        __struct.rssi = buf.get_u8();
20888        Ok(__struct)
20889    }
20890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20891        let mut __tmp = BytesMut::new(bytes);
20892        #[allow(clippy::absurd_extreme_comparisons)]
20893        #[allow(unused_comparisons)]
20894        if __tmp.remaining() < Self::ENCODED_LEN {
20895            panic!(
20896                "buffer is too small (need {} bytes, but got {})",
20897                Self::ENCODED_LEN,
20898                __tmp.remaining(),
20899            )
20900        }
20901        __tmp.put_u64_le(self.time_usec);
20902        __tmp.put_u16_le(self.chan1_raw);
20903        __tmp.put_u16_le(self.chan2_raw);
20904        __tmp.put_u16_le(self.chan3_raw);
20905        __tmp.put_u16_le(self.chan4_raw);
20906        __tmp.put_u16_le(self.chan5_raw);
20907        __tmp.put_u16_le(self.chan6_raw);
20908        __tmp.put_u16_le(self.chan7_raw);
20909        __tmp.put_u16_le(self.chan8_raw);
20910        __tmp.put_u16_le(self.chan9_raw);
20911        __tmp.put_u16_le(self.chan10_raw);
20912        __tmp.put_u16_le(self.chan11_raw);
20913        __tmp.put_u16_le(self.chan12_raw);
20914        __tmp.put_u8(self.rssi);
20915        if matches!(version, MavlinkVersion::V2) {
20916            let len = __tmp.len();
20917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20918        } else {
20919            __tmp.len()
20920        }
20921    }
20922}
20923#[doc = "id: 390"]
20924#[doc = "Hardware status sent by an onboard computer."]
20925#[derive(Debug, Clone, PartialEq)]
20926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20928pub struct ONBOARD_COMPUTER_STATUS_DATA {
20929    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20930    pub time_usec: u64,
20931    #[doc = "Time since system boot."]
20932    pub uptime: u32,
20933    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20934    pub ram_usage: u32,
20935    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20936    pub ram_total: u32,
20937    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
20938    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20939    pub storage_type: [u32; 4],
20940    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20941    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20942    pub storage_usage: [u32; 4],
20943    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20945    pub storage_total: [u32; 4],
20946    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
20947    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20948    pub link_type: [u32; 6],
20949    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
20950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20951    pub link_tx_rate: [u32; 6],
20952    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
20953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20954    pub link_rx_rate: [u32; 6],
20955    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
20956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20957    pub link_tx_max: [u32; 6],
20958    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
20959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20960    pub link_rx_max: [u32; 6],
20961    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
20962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20963    pub fan_speed: [i16; 4],
20964    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
20965    pub mavtype: u8,
20966    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20968    pub cpu_cores: [u8; 8],
20969    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20970    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20971    pub cpu_combined: [u8; 10],
20972    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20973    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20974    pub gpu_cores: [u8; 4],
20975    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20976    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20977    pub gpu_combined: [u8; 10],
20978    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
20979    pub temperature_board: i8,
20980    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
20981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20982    pub temperature_core: [i8; 8],
20983}
20984impl ONBOARD_COMPUTER_STATUS_DATA {
20985    pub const ENCODED_LEN: usize = 238usize;
20986    pub const DEFAULT: Self = Self {
20987        time_usec: 0_u64,
20988        uptime: 0_u32,
20989        ram_usage: 0_u32,
20990        ram_total: 0_u32,
20991        storage_type: [0_u32; 4usize],
20992        storage_usage: [0_u32; 4usize],
20993        storage_total: [0_u32; 4usize],
20994        link_type: [0_u32; 6usize],
20995        link_tx_rate: [0_u32; 6usize],
20996        link_rx_rate: [0_u32; 6usize],
20997        link_tx_max: [0_u32; 6usize],
20998        link_rx_max: [0_u32; 6usize],
20999        fan_speed: [0_i16; 4usize],
21000        mavtype: 0_u8,
21001        cpu_cores: [0_u8; 8usize],
21002        cpu_combined: [0_u8; 10usize],
21003        gpu_cores: [0_u8; 4usize],
21004        gpu_combined: [0_u8; 10usize],
21005        temperature_board: 0_i8,
21006        temperature_core: [0_i8; 8usize],
21007    };
21008    #[cfg(feature = "arbitrary")]
21009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21010        use arbitrary::{Arbitrary, Unstructured};
21011        let mut buf = [0u8; 1024];
21012        rng.fill_bytes(&mut buf);
21013        let mut unstructured = Unstructured::new(&buf);
21014        Self::arbitrary(&mut unstructured).unwrap_or_default()
21015    }
21016}
21017impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21018    fn default() -> Self {
21019        Self::DEFAULT.clone()
21020    }
21021}
21022impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21023    type Message = MavMessage;
21024    const ID: u32 = 390u32;
21025    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21026    const EXTRA_CRC: u8 = 156u8;
21027    const ENCODED_LEN: usize = 238usize;
21028    fn deser(
21029        _version: MavlinkVersion,
21030        __input: &[u8],
21031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21032        let avail_len = __input.len();
21033        let mut payload_buf = [0; Self::ENCODED_LEN];
21034        let mut buf = if avail_len < Self::ENCODED_LEN {
21035            payload_buf[0..avail_len].copy_from_slice(__input);
21036            Bytes::new(&payload_buf)
21037        } else {
21038            Bytes::new(__input)
21039        };
21040        let mut __struct = Self::default();
21041        __struct.time_usec = buf.get_u64_le();
21042        __struct.uptime = buf.get_u32_le();
21043        __struct.ram_usage = buf.get_u32_le();
21044        __struct.ram_total = buf.get_u32_le();
21045        for v in &mut __struct.storage_type {
21046            let val = buf.get_u32_le();
21047            *v = val;
21048        }
21049        for v in &mut __struct.storage_usage {
21050            let val = buf.get_u32_le();
21051            *v = val;
21052        }
21053        for v in &mut __struct.storage_total {
21054            let val = buf.get_u32_le();
21055            *v = val;
21056        }
21057        for v in &mut __struct.link_type {
21058            let val = buf.get_u32_le();
21059            *v = val;
21060        }
21061        for v in &mut __struct.link_tx_rate {
21062            let val = buf.get_u32_le();
21063            *v = val;
21064        }
21065        for v in &mut __struct.link_rx_rate {
21066            let val = buf.get_u32_le();
21067            *v = val;
21068        }
21069        for v in &mut __struct.link_tx_max {
21070            let val = buf.get_u32_le();
21071            *v = val;
21072        }
21073        for v in &mut __struct.link_rx_max {
21074            let val = buf.get_u32_le();
21075            *v = val;
21076        }
21077        for v in &mut __struct.fan_speed {
21078            let val = buf.get_i16_le();
21079            *v = val;
21080        }
21081        __struct.mavtype = buf.get_u8();
21082        for v in &mut __struct.cpu_cores {
21083            let val = buf.get_u8();
21084            *v = val;
21085        }
21086        for v in &mut __struct.cpu_combined {
21087            let val = buf.get_u8();
21088            *v = val;
21089        }
21090        for v in &mut __struct.gpu_cores {
21091            let val = buf.get_u8();
21092            *v = val;
21093        }
21094        for v in &mut __struct.gpu_combined {
21095            let val = buf.get_u8();
21096            *v = val;
21097        }
21098        __struct.temperature_board = buf.get_i8();
21099        for v in &mut __struct.temperature_core {
21100            let val = buf.get_i8();
21101            *v = val;
21102        }
21103        Ok(__struct)
21104    }
21105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21106        let mut __tmp = BytesMut::new(bytes);
21107        #[allow(clippy::absurd_extreme_comparisons)]
21108        #[allow(unused_comparisons)]
21109        if __tmp.remaining() < Self::ENCODED_LEN {
21110            panic!(
21111                "buffer is too small (need {} bytes, but got {})",
21112                Self::ENCODED_LEN,
21113                __tmp.remaining(),
21114            )
21115        }
21116        __tmp.put_u64_le(self.time_usec);
21117        __tmp.put_u32_le(self.uptime);
21118        __tmp.put_u32_le(self.ram_usage);
21119        __tmp.put_u32_le(self.ram_total);
21120        for val in &self.storage_type {
21121            __tmp.put_u32_le(*val);
21122        }
21123        for val in &self.storage_usage {
21124            __tmp.put_u32_le(*val);
21125        }
21126        for val in &self.storage_total {
21127            __tmp.put_u32_le(*val);
21128        }
21129        for val in &self.link_type {
21130            __tmp.put_u32_le(*val);
21131        }
21132        for val in &self.link_tx_rate {
21133            __tmp.put_u32_le(*val);
21134        }
21135        for val in &self.link_rx_rate {
21136            __tmp.put_u32_le(*val);
21137        }
21138        for val in &self.link_tx_max {
21139            __tmp.put_u32_le(*val);
21140        }
21141        for val in &self.link_rx_max {
21142            __tmp.put_u32_le(*val);
21143        }
21144        for val in &self.fan_speed {
21145            __tmp.put_i16_le(*val);
21146        }
21147        __tmp.put_u8(self.mavtype);
21148        for val in &self.cpu_cores {
21149            __tmp.put_u8(*val);
21150        }
21151        for val in &self.cpu_combined {
21152            __tmp.put_u8(*val);
21153        }
21154        for val in &self.gpu_cores {
21155            __tmp.put_u8(*val);
21156        }
21157        for val in &self.gpu_combined {
21158            __tmp.put_u8(*val);
21159        }
21160        __tmp.put_i8(self.temperature_board);
21161        for val in &self.temperature_core {
21162            __tmp.put_i8(*val);
21163        }
21164        if matches!(version, MavlinkVersion::V2) {
21165            let len = __tmp.len();
21166            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21167        } else {
21168            __tmp.len()
21169        }
21170    }
21171}
21172#[doc = "id: 50"]
21173#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
21174#[derive(Debug, Clone, PartialEq)]
21175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21177pub struct PARAM_MAP_RC_DATA {
21178    #[doc = "Initial parameter value"]
21179    pub param_value0: f32,
21180    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
21181    pub scale: f32,
21182    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
21183    pub param_value_min: f32,
21184    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
21185    pub param_value_max: f32,
21186    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
21187    pub param_index: i16,
21188    #[doc = "System ID"]
21189    pub target_system: u8,
21190    #[doc = "Component ID"]
21191    pub target_component: u8,
21192    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
21193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21194    pub param_id: [u8; 16],
21195    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
21196    pub parameter_rc_channel_index: u8,
21197}
21198impl PARAM_MAP_RC_DATA {
21199    pub const ENCODED_LEN: usize = 37usize;
21200    pub const DEFAULT: Self = Self {
21201        param_value0: 0.0_f32,
21202        scale: 0.0_f32,
21203        param_value_min: 0.0_f32,
21204        param_value_max: 0.0_f32,
21205        param_index: 0_i16,
21206        target_system: 0_u8,
21207        target_component: 0_u8,
21208        param_id: [0_u8; 16usize],
21209        parameter_rc_channel_index: 0_u8,
21210    };
21211    #[cfg(feature = "arbitrary")]
21212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21213        use arbitrary::{Arbitrary, Unstructured};
21214        let mut buf = [0u8; 1024];
21215        rng.fill_bytes(&mut buf);
21216        let mut unstructured = Unstructured::new(&buf);
21217        Self::arbitrary(&mut unstructured).unwrap_or_default()
21218    }
21219}
21220impl Default for PARAM_MAP_RC_DATA {
21221    fn default() -> Self {
21222        Self::DEFAULT.clone()
21223    }
21224}
21225impl MessageData for PARAM_MAP_RC_DATA {
21226    type Message = MavMessage;
21227    const ID: u32 = 50u32;
21228    const NAME: &'static str = "PARAM_MAP_RC";
21229    const EXTRA_CRC: u8 = 78u8;
21230    const ENCODED_LEN: usize = 37usize;
21231    fn deser(
21232        _version: MavlinkVersion,
21233        __input: &[u8],
21234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21235        let avail_len = __input.len();
21236        let mut payload_buf = [0; Self::ENCODED_LEN];
21237        let mut buf = if avail_len < Self::ENCODED_LEN {
21238            payload_buf[0..avail_len].copy_from_slice(__input);
21239            Bytes::new(&payload_buf)
21240        } else {
21241            Bytes::new(__input)
21242        };
21243        let mut __struct = Self::default();
21244        __struct.param_value0 = buf.get_f32_le();
21245        __struct.scale = buf.get_f32_le();
21246        __struct.param_value_min = buf.get_f32_le();
21247        __struct.param_value_max = buf.get_f32_le();
21248        __struct.param_index = buf.get_i16_le();
21249        __struct.target_system = buf.get_u8();
21250        __struct.target_component = buf.get_u8();
21251        for v in &mut __struct.param_id {
21252            let val = buf.get_u8();
21253            *v = val;
21254        }
21255        __struct.parameter_rc_channel_index = buf.get_u8();
21256        Ok(__struct)
21257    }
21258    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21259        let mut __tmp = BytesMut::new(bytes);
21260        #[allow(clippy::absurd_extreme_comparisons)]
21261        #[allow(unused_comparisons)]
21262        if __tmp.remaining() < Self::ENCODED_LEN {
21263            panic!(
21264                "buffer is too small (need {} bytes, but got {})",
21265                Self::ENCODED_LEN,
21266                __tmp.remaining(),
21267            )
21268        }
21269        __tmp.put_f32_le(self.param_value0);
21270        __tmp.put_f32_le(self.scale);
21271        __tmp.put_f32_le(self.param_value_min);
21272        __tmp.put_f32_le(self.param_value_max);
21273        __tmp.put_i16_le(self.param_index);
21274        __tmp.put_u8(self.target_system);
21275        __tmp.put_u8(self.target_component);
21276        for val in &self.param_id {
21277            __tmp.put_u8(*val);
21278        }
21279        __tmp.put_u8(self.parameter_rc_channel_index);
21280        if matches!(version, MavlinkVersion::V2) {
21281            let len = __tmp.len();
21282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21283        } else {
21284            __tmp.len()
21285        }
21286    }
21287}
21288#[doc = "id: 25"]
21289#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
21290#[derive(Debug, Clone, PartialEq)]
21291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21293pub struct GPS_STATUS_DATA {
21294    #[doc = "Number of satellites visible"]
21295    pub satellites_visible: u8,
21296    #[doc = "Global satellite ID"]
21297    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21298    pub satellite_prn: [u8; 20],
21299    #[doc = "0: Satellite not used, 1: used for localization"]
21300    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21301    pub satellite_used: [u8; 20],
21302    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
21303    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21304    pub satellite_elevation: [u8; 20],
21305    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
21306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21307    pub satellite_azimuth: [u8; 20],
21308    #[doc = "Signal to noise ratio of satellite"]
21309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21310    pub satellite_snr: [u8; 20],
21311}
21312impl GPS_STATUS_DATA {
21313    pub const ENCODED_LEN: usize = 101usize;
21314    pub const DEFAULT: Self = Self {
21315        satellites_visible: 0_u8,
21316        satellite_prn: [0_u8; 20usize],
21317        satellite_used: [0_u8; 20usize],
21318        satellite_elevation: [0_u8; 20usize],
21319        satellite_azimuth: [0_u8; 20usize],
21320        satellite_snr: [0_u8; 20usize],
21321    };
21322    #[cfg(feature = "arbitrary")]
21323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21324        use arbitrary::{Arbitrary, Unstructured};
21325        let mut buf = [0u8; 1024];
21326        rng.fill_bytes(&mut buf);
21327        let mut unstructured = Unstructured::new(&buf);
21328        Self::arbitrary(&mut unstructured).unwrap_or_default()
21329    }
21330}
21331impl Default for GPS_STATUS_DATA {
21332    fn default() -> Self {
21333        Self::DEFAULT.clone()
21334    }
21335}
21336impl MessageData for GPS_STATUS_DATA {
21337    type Message = MavMessage;
21338    const ID: u32 = 25u32;
21339    const NAME: &'static str = "GPS_STATUS";
21340    const EXTRA_CRC: u8 = 23u8;
21341    const ENCODED_LEN: usize = 101usize;
21342    fn deser(
21343        _version: MavlinkVersion,
21344        __input: &[u8],
21345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21346        let avail_len = __input.len();
21347        let mut payload_buf = [0; Self::ENCODED_LEN];
21348        let mut buf = if avail_len < Self::ENCODED_LEN {
21349            payload_buf[0..avail_len].copy_from_slice(__input);
21350            Bytes::new(&payload_buf)
21351        } else {
21352            Bytes::new(__input)
21353        };
21354        let mut __struct = Self::default();
21355        __struct.satellites_visible = buf.get_u8();
21356        for v in &mut __struct.satellite_prn {
21357            let val = buf.get_u8();
21358            *v = val;
21359        }
21360        for v in &mut __struct.satellite_used {
21361            let val = buf.get_u8();
21362            *v = val;
21363        }
21364        for v in &mut __struct.satellite_elevation {
21365            let val = buf.get_u8();
21366            *v = val;
21367        }
21368        for v in &mut __struct.satellite_azimuth {
21369            let val = buf.get_u8();
21370            *v = val;
21371        }
21372        for v in &mut __struct.satellite_snr {
21373            let val = buf.get_u8();
21374            *v = val;
21375        }
21376        Ok(__struct)
21377    }
21378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21379        let mut __tmp = BytesMut::new(bytes);
21380        #[allow(clippy::absurd_extreme_comparisons)]
21381        #[allow(unused_comparisons)]
21382        if __tmp.remaining() < Self::ENCODED_LEN {
21383            panic!(
21384                "buffer is too small (need {} bytes, but got {})",
21385                Self::ENCODED_LEN,
21386                __tmp.remaining(),
21387            )
21388        }
21389        __tmp.put_u8(self.satellites_visible);
21390        for val in &self.satellite_prn {
21391            __tmp.put_u8(*val);
21392        }
21393        for val in &self.satellite_used {
21394            __tmp.put_u8(*val);
21395        }
21396        for val in &self.satellite_elevation {
21397            __tmp.put_u8(*val);
21398        }
21399        for val in &self.satellite_azimuth {
21400            __tmp.put_u8(*val);
21401        }
21402        for val in &self.satellite_snr {
21403            __tmp.put_u8(*val);
21404        }
21405        if matches!(version, MavlinkVersion::V2) {
21406            let len = __tmp.len();
21407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21408        } else {
21409            __tmp.len()
21410        }
21411    }
21412}
21413#[doc = "id: 241"]
21414#[doc = "Vibration levels and accelerometer clipping."]
21415#[derive(Debug, Clone, PartialEq)]
21416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21418pub struct VIBRATION_DATA {
21419    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21420    pub time_usec: u64,
21421    #[doc = "Vibration levels on X-axis"]
21422    pub vibration_x: f32,
21423    #[doc = "Vibration levels on Y-axis"]
21424    pub vibration_y: f32,
21425    #[doc = "Vibration levels on Z-axis"]
21426    pub vibration_z: f32,
21427    #[doc = "first accelerometer clipping count"]
21428    pub clipping_0: u32,
21429    #[doc = "second accelerometer clipping count"]
21430    pub clipping_1: u32,
21431    #[doc = "third accelerometer clipping count"]
21432    pub clipping_2: u32,
21433}
21434impl VIBRATION_DATA {
21435    pub const ENCODED_LEN: usize = 32usize;
21436    pub const DEFAULT: Self = Self {
21437        time_usec: 0_u64,
21438        vibration_x: 0.0_f32,
21439        vibration_y: 0.0_f32,
21440        vibration_z: 0.0_f32,
21441        clipping_0: 0_u32,
21442        clipping_1: 0_u32,
21443        clipping_2: 0_u32,
21444    };
21445    #[cfg(feature = "arbitrary")]
21446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21447        use arbitrary::{Arbitrary, Unstructured};
21448        let mut buf = [0u8; 1024];
21449        rng.fill_bytes(&mut buf);
21450        let mut unstructured = Unstructured::new(&buf);
21451        Self::arbitrary(&mut unstructured).unwrap_or_default()
21452    }
21453}
21454impl Default for VIBRATION_DATA {
21455    fn default() -> Self {
21456        Self::DEFAULT.clone()
21457    }
21458}
21459impl MessageData for VIBRATION_DATA {
21460    type Message = MavMessage;
21461    const ID: u32 = 241u32;
21462    const NAME: &'static str = "VIBRATION";
21463    const EXTRA_CRC: u8 = 90u8;
21464    const ENCODED_LEN: usize = 32usize;
21465    fn deser(
21466        _version: MavlinkVersion,
21467        __input: &[u8],
21468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21469        let avail_len = __input.len();
21470        let mut payload_buf = [0; Self::ENCODED_LEN];
21471        let mut buf = if avail_len < Self::ENCODED_LEN {
21472            payload_buf[0..avail_len].copy_from_slice(__input);
21473            Bytes::new(&payload_buf)
21474        } else {
21475            Bytes::new(__input)
21476        };
21477        let mut __struct = Self::default();
21478        __struct.time_usec = buf.get_u64_le();
21479        __struct.vibration_x = buf.get_f32_le();
21480        __struct.vibration_y = buf.get_f32_le();
21481        __struct.vibration_z = buf.get_f32_le();
21482        __struct.clipping_0 = buf.get_u32_le();
21483        __struct.clipping_1 = buf.get_u32_le();
21484        __struct.clipping_2 = buf.get_u32_le();
21485        Ok(__struct)
21486    }
21487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21488        let mut __tmp = BytesMut::new(bytes);
21489        #[allow(clippy::absurd_extreme_comparisons)]
21490        #[allow(unused_comparisons)]
21491        if __tmp.remaining() < Self::ENCODED_LEN {
21492            panic!(
21493                "buffer is too small (need {} bytes, but got {})",
21494                Self::ENCODED_LEN,
21495                __tmp.remaining(),
21496            )
21497        }
21498        __tmp.put_u64_le(self.time_usec);
21499        __tmp.put_f32_le(self.vibration_x);
21500        __tmp.put_f32_le(self.vibration_y);
21501        __tmp.put_f32_le(self.vibration_z);
21502        __tmp.put_u32_le(self.clipping_0);
21503        __tmp.put_u32_le(self.clipping_1);
21504        __tmp.put_u32_le(self.clipping_2);
21505        if matches!(version, MavlinkVersion::V2) {
21506            let len = __tmp.len();
21507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21508        } else {
21509            __tmp.len()
21510        }
21511    }
21512}
21513#[doc = "id: 333"]
21514#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
21515#[derive(Debug, Clone, PartialEq)]
21516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21518pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21519    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21520    pub time_usec: u64,
21521    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
21522    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21523    pub pos_x: [f32; 5],
21524    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
21525    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21526    pub pos_y: [f32; 5],
21527    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
21528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21529    pub pos_z: [f32; 5],
21530    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
21531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21532    pub delta: [f32; 5],
21533    #[doc = "Yaw. Set to NaN for unchanged"]
21534    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21535    pub pos_yaw: [f32; 5],
21536    #[doc = "Number of valid control points (up-to 5 points are possible)"]
21537    pub valid_points: u8,
21538}
21539impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21540    pub const ENCODED_LEN: usize = 109usize;
21541    pub const DEFAULT: Self = Self {
21542        time_usec: 0_u64,
21543        pos_x: [0.0_f32; 5usize],
21544        pos_y: [0.0_f32; 5usize],
21545        pos_z: [0.0_f32; 5usize],
21546        delta: [0.0_f32; 5usize],
21547        pos_yaw: [0.0_f32; 5usize],
21548        valid_points: 0_u8,
21549    };
21550    #[cfg(feature = "arbitrary")]
21551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21552        use arbitrary::{Arbitrary, Unstructured};
21553        let mut buf = [0u8; 1024];
21554        rng.fill_bytes(&mut buf);
21555        let mut unstructured = Unstructured::new(&buf);
21556        Self::arbitrary(&mut unstructured).unwrap_or_default()
21557    }
21558}
21559impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21560    fn default() -> Self {
21561        Self::DEFAULT.clone()
21562    }
21563}
21564impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21565    type Message = MavMessage;
21566    const ID: u32 = 333u32;
21567    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
21568    const EXTRA_CRC: u8 = 231u8;
21569    const ENCODED_LEN: usize = 109usize;
21570    fn deser(
21571        _version: MavlinkVersion,
21572        __input: &[u8],
21573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21574        let avail_len = __input.len();
21575        let mut payload_buf = [0; Self::ENCODED_LEN];
21576        let mut buf = if avail_len < Self::ENCODED_LEN {
21577            payload_buf[0..avail_len].copy_from_slice(__input);
21578            Bytes::new(&payload_buf)
21579        } else {
21580            Bytes::new(__input)
21581        };
21582        let mut __struct = Self::default();
21583        __struct.time_usec = buf.get_u64_le();
21584        for v in &mut __struct.pos_x {
21585            let val = buf.get_f32_le();
21586            *v = val;
21587        }
21588        for v in &mut __struct.pos_y {
21589            let val = buf.get_f32_le();
21590            *v = val;
21591        }
21592        for v in &mut __struct.pos_z {
21593            let val = buf.get_f32_le();
21594            *v = val;
21595        }
21596        for v in &mut __struct.delta {
21597            let val = buf.get_f32_le();
21598            *v = val;
21599        }
21600        for v in &mut __struct.pos_yaw {
21601            let val = buf.get_f32_le();
21602            *v = val;
21603        }
21604        __struct.valid_points = buf.get_u8();
21605        Ok(__struct)
21606    }
21607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21608        let mut __tmp = BytesMut::new(bytes);
21609        #[allow(clippy::absurd_extreme_comparisons)]
21610        #[allow(unused_comparisons)]
21611        if __tmp.remaining() < Self::ENCODED_LEN {
21612            panic!(
21613                "buffer is too small (need {} bytes, but got {})",
21614                Self::ENCODED_LEN,
21615                __tmp.remaining(),
21616            )
21617        }
21618        __tmp.put_u64_le(self.time_usec);
21619        for val in &self.pos_x {
21620            __tmp.put_f32_le(*val);
21621        }
21622        for val in &self.pos_y {
21623            __tmp.put_f32_le(*val);
21624        }
21625        for val in &self.pos_z {
21626            __tmp.put_f32_le(*val);
21627        }
21628        for val in &self.delta {
21629            __tmp.put_f32_le(*val);
21630        }
21631        for val in &self.pos_yaw {
21632            __tmp.put_f32_le(*val);
21633        }
21634        __tmp.put_u8(self.valid_points);
21635        if matches!(version, MavlinkVersion::V2) {
21636            let len = __tmp.len();
21637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21638        } else {
21639            __tmp.len()
21640        }
21641    }
21642}
21643#[doc = "id: 360"]
21644#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
21645#[derive(Debug, Clone, PartialEq)]
21646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21648pub struct ORBIT_EXECUTION_STATUS_DATA {
21649    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21650    pub time_usec: u64,
21651    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
21652    pub radius: f32,
21653    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
21654    pub x: i32,
21655    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
21656    pub y: i32,
21657    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
21658    pub z: f32,
21659    #[doc = "The coordinate system of the fields: x, y, z."]
21660    pub frame: MavFrame,
21661}
21662impl ORBIT_EXECUTION_STATUS_DATA {
21663    pub const ENCODED_LEN: usize = 25usize;
21664    pub const DEFAULT: Self = Self {
21665        time_usec: 0_u64,
21666        radius: 0.0_f32,
21667        x: 0_i32,
21668        y: 0_i32,
21669        z: 0.0_f32,
21670        frame: MavFrame::DEFAULT,
21671    };
21672    #[cfg(feature = "arbitrary")]
21673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21674        use arbitrary::{Arbitrary, Unstructured};
21675        let mut buf = [0u8; 1024];
21676        rng.fill_bytes(&mut buf);
21677        let mut unstructured = Unstructured::new(&buf);
21678        Self::arbitrary(&mut unstructured).unwrap_or_default()
21679    }
21680}
21681impl Default for ORBIT_EXECUTION_STATUS_DATA {
21682    fn default() -> Self {
21683        Self::DEFAULT.clone()
21684    }
21685}
21686impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
21687    type Message = MavMessage;
21688    const ID: u32 = 360u32;
21689    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
21690    const EXTRA_CRC: u8 = 11u8;
21691    const ENCODED_LEN: usize = 25usize;
21692    fn deser(
21693        _version: MavlinkVersion,
21694        __input: &[u8],
21695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21696        let avail_len = __input.len();
21697        let mut payload_buf = [0; Self::ENCODED_LEN];
21698        let mut buf = if avail_len < Self::ENCODED_LEN {
21699            payload_buf[0..avail_len].copy_from_slice(__input);
21700            Bytes::new(&payload_buf)
21701        } else {
21702            Bytes::new(__input)
21703        };
21704        let mut __struct = Self::default();
21705        __struct.time_usec = buf.get_u64_le();
21706        __struct.radius = buf.get_f32_le();
21707        __struct.x = buf.get_i32_le();
21708        __struct.y = buf.get_i32_le();
21709        __struct.z = buf.get_f32_le();
21710        let tmp = buf.get_u8();
21711        __struct.frame =
21712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21713                enum_type: "MavFrame",
21714                value: tmp as u32,
21715            })?;
21716        Ok(__struct)
21717    }
21718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21719        let mut __tmp = BytesMut::new(bytes);
21720        #[allow(clippy::absurd_extreme_comparisons)]
21721        #[allow(unused_comparisons)]
21722        if __tmp.remaining() < Self::ENCODED_LEN {
21723            panic!(
21724                "buffer is too small (need {} bytes, but got {})",
21725                Self::ENCODED_LEN,
21726                __tmp.remaining(),
21727            )
21728        }
21729        __tmp.put_u64_le(self.time_usec);
21730        __tmp.put_f32_le(self.radius);
21731        __tmp.put_i32_le(self.x);
21732        __tmp.put_i32_le(self.y);
21733        __tmp.put_f32_le(self.z);
21734        __tmp.put_u8(self.frame as u8);
21735        if matches!(version, MavlinkVersion::V2) {
21736            let len = __tmp.len();
21737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21738        } else {
21739            __tmp.len()
21740        }
21741    }
21742}
21743#[doc = "id: 8"]
21744#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
21745#[derive(Debug, Clone, PartialEq)]
21746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21748pub struct LINK_NODE_STATUS_DATA {
21749    #[doc = "Timestamp (time since system boot)."]
21750    pub timestamp: u64,
21751    #[doc = "Transmit rate"]
21752    pub tx_rate: u32,
21753    #[doc = "Receive rate"]
21754    pub rx_rate: u32,
21755    #[doc = "Messages sent"]
21756    pub messages_sent: u32,
21757    #[doc = "Messages received (estimated from counting seq)"]
21758    pub messages_received: u32,
21759    #[doc = "Messages lost (estimated from counting seq)"]
21760    pub messages_lost: u32,
21761    #[doc = "Number of bytes that could not be parsed correctly."]
21762    pub rx_parse_err: u16,
21763    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
21764    pub tx_overflows: u16,
21765    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
21766    pub rx_overflows: u16,
21767    #[doc = "Remaining free transmit buffer space"]
21768    pub tx_buf: u8,
21769    #[doc = "Remaining free receive buffer space"]
21770    pub rx_buf: u8,
21771}
21772impl LINK_NODE_STATUS_DATA {
21773    pub const ENCODED_LEN: usize = 36usize;
21774    pub const DEFAULT: Self = Self {
21775        timestamp: 0_u64,
21776        tx_rate: 0_u32,
21777        rx_rate: 0_u32,
21778        messages_sent: 0_u32,
21779        messages_received: 0_u32,
21780        messages_lost: 0_u32,
21781        rx_parse_err: 0_u16,
21782        tx_overflows: 0_u16,
21783        rx_overflows: 0_u16,
21784        tx_buf: 0_u8,
21785        rx_buf: 0_u8,
21786    };
21787    #[cfg(feature = "arbitrary")]
21788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21789        use arbitrary::{Arbitrary, Unstructured};
21790        let mut buf = [0u8; 1024];
21791        rng.fill_bytes(&mut buf);
21792        let mut unstructured = Unstructured::new(&buf);
21793        Self::arbitrary(&mut unstructured).unwrap_or_default()
21794    }
21795}
21796impl Default for LINK_NODE_STATUS_DATA {
21797    fn default() -> Self {
21798        Self::DEFAULT.clone()
21799    }
21800}
21801impl MessageData for LINK_NODE_STATUS_DATA {
21802    type Message = MavMessage;
21803    const ID: u32 = 8u32;
21804    const NAME: &'static str = "LINK_NODE_STATUS";
21805    const EXTRA_CRC: u8 = 117u8;
21806    const ENCODED_LEN: usize = 36usize;
21807    fn deser(
21808        _version: MavlinkVersion,
21809        __input: &[u8],
21810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21811        let avail_len = __input.len();
21812        let mut payload_buf = [0; Self::ENCODED_LEN];
21813        let mut buf = if avail_len < Self::ENCODED_LEN {
21814            payload_buf[0..avail_len].copy_from_slice(__input);
21815            Bytes::new(&payload_buf)
21816        } else {
21817            Bytes::new(__input)
21818        };
21819        let mut __struct = Self::default();
21820        __struct.timestamp = buf.get_u64_le();
21821        __struct.tx_rate = buf.get_u32_le();
21822        __struct.rx_rate = buf.get_u32_le();
21823        __struct.messages_sent = buf.get_u32_le();
21824        __struct.messages_received = buf.get_u32_le();
21825        __struct.messages_lost = buf.get_u32_le();
21826        __struct.rx_parse_err = buf.get_u16_le();
21827        __struct.tx_overflows = buf.get_u16_le();
21828        __struct.rx_overflows = buf.get_u16_le();
21829        __struct.tx_buf = buf.get_u8();
21830        __struct.rx_buf = buf.get_u8();
21831        Ok(__struct)
21832    }
21833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21834        let mut __tmp = BytesMut::new(bytes);
21835        #[allow(clippy::absurd_extreme_comparisons)]
21836        #[allow(unused_comparisons)]
21837        if __tmp.remaining() < Self::ENCODED_LEN {
21838            panic!(
21839                "buffer is too small (need {} bytes, but got {})",
21840                Self::ENCODED_LEN,
21841                __tmp.remaining(),
21842            )
21843        }
21844        __tmp.put_u64_le(self.timestamp);
21845        __tmp.put_u32_le(self.tx_rate);
21846        __tmp.put_u32_le(self.rx_rate);
21847        __tmp.put_u32_le(self.messages_sent);
21848        __tmp.put_u32_le(self.messages_received);
21849        __tmp.put_u32_le(self.messages_lost);
21850        __tmp.put_u16_le(self.rx_parse_err);
21851        __tmp.put_u16_le(self.tx_overflows);
21852        __tmp.put_u16_le(self.rx_overflows);
21853        __tmp.put_u8(self.tx_buf);
21854        __tmp.put_u8(self.rx_buf);
21855        if matches!(version, MavlinkVersion::V2) {
21856            let len = __tmp.len();
21857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21858        } else {
21859            __tmp.len()
21860        }
21861    }
21862}
21863#[doc = "id: 12904"]
21864#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
21865#[derive(Debug, Clone, PartialEq)]
21866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21868pub struct OPEN_DRONE_ID_SYSTEM_DATA {
21869    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21870    pub operator_latitude: i32,
21871    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21872    pub operator_longitude: i32,
21873    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21874    pub area_ceiling: f32,
21875    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21876    pub area_floor: f32,
21877    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21878    pub operator_altitude_geo: f32,
21879    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21880    pub timestamp: u32,
21881    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
21882    pub area_count: u16,
21883    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
21884    pub area_radius: u16,
21885    #[doc = "System ID (0 for broadcast)."]
21886    pub target_system: u8,
21887    #[doc = "Component ID (0 for broadcast)."]
21888    pub target_component: u8,
21889    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21891    pub id_or_mac: [u8; 20],
21892    #[doc = "Specifies the operator location type."]
21893    pub operator_location_type: MavOdidOperatorLocationType,
21894    #[doc = "Specifies the classification type of the UA."]
21895    pub classification_type: MavOdidClassificationType,
21896    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
21897    pub category_eu: MavOdidCategoryEu,
21898    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
21899    pub class_eu: MavOdidClassEu,
21900}
21901impl OPEN_DRONE_ID_SYSTEM_DATA {
21902    pub const ENCODED_LEN: usize = 54usize;
21903    pub const DEFAULT: Self = Self {
21904        operator_latitude: 0_i32,
21905        operator_longitude: 0_i32,
21906        area_ceiling: 0.0_f32,
21907        area_floor: 0.0_f32,
21908        operator_altitude_geo: 0.0_f32,
21909        timestamp: 0_u32,
21910        area_count: 0_u16,
21911        area_radius: 0_u16,
21912        target_system: 0_u8,
21913        target_component: 0_u8,
21914        id_or_mac: [0_u8; 20usize],
21915        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
21916        classification_type: MavOdidClassificationType::DEFAULT,
21917        category_eu: MavOdidCategoryEu::DEFAULT,
21918        class_eu: MavOdidClassEu::DEFAULT,
21919    };
21920    #[cfg(feature = "arbitrary")]
21921    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21922        use arbitrary::{Arbitrary, Unstructured};
21923        let mut buf = [0u8; 1024];
21924        rng.fill_bytes(&mut buf);
21925        let mut unstructured = Unstructured::new(&buf);
21926        Self::arbitrary(&mut unstructured).unwrap_or_default()
21927    }
21928}
21929impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
21930    fn default() -> Self {
21931        Self::DEFAULT.clone()
21932    }
21933}
21934impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
21935    type Message = MavMessage;
21936    const ID: u32 = 12904u32;
21937    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
21938    const EXTRA_CRC: u8 = 77u8;
21939    const ENCODED_LEN: usize = 54usize;
21940    fn deser(
21941        _version: MavlinkVersion,
21942        __input: &[u8],
21943    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21944        let avail_len = __input.len();
21945        let mut payload_buf = [0; Self::ENCODED_LEN];
21946        let mut buf = if avail_len < Self::ENCODED_LEN {
21947            payload_buf[0..avail_len].copy_from_slice(__input);
21948            Bytes::new(&payload_buf)
21949        } else {
21950            Bytes::new(__input)
21951        };
21952        let mut __struct = Self::default();
21953        __struct.operator_latitude = buf.get_i32_le();
21954        __struct.operator_longitude = buf.get_i32_le();
21955        __struct.area_ceiling = buf.get_f32_le();
21956        __struct.area_floor = buf.get_f32_le();
21957        __struct.operator_altitude_geo = buf.get_f32_le();
21958        __struct.timestamp = buf.get_u32_le();
21959        __struct.area_count = buf.get_u16_le();
21960        __struct.area_radius = buf.get_u16_le();
21961        __struct.target_system = buf.get_u8();
21962        __struct.target_component = buf.get_u8();
21963        for v in &mut __struct.id_or_mac {
21964            let val = buf.get_u8();
21965            *v = val;
21966        }
21967        let tmp = buf.get_u8();
21968        __struct.operator_location_type =
21969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21970                enum_type: "MavOdidOperatorLocationType",
21971                value: tmp as u32,
21972            })?;
21973        let tmp = buf.get_u8();
21974        __struct.classification_type =
21975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21976                enum_type: "MavOdidClassificationType",
21977                value: tmp as u32,
21978            })?;
21979        let tmp = buf.get_u8();
21980        __struct.category_eu =
21981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21982                enum_type: "MavOdidCategoryEu",
21983                value: tmp as u32,
21984            })?;
21985        let tmp = buf.get_u8();
21986        __struct.class_eu =
21987            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21988                enum_type: "MavOdidClassEu",
21989                value: tmp as u32,
21990            })?;
21991        Ok(__struct)
21992    }
21993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21994        let mut __tmp = BytesMut::new(bytes);
21995        #[allow(clippy::absurd_extreme_comparisons)]
21996        #[allow(unused_comparisons)]
21997        if __tmp.remaining() < Self::ENCODED_LEN {
21998            panic!(
21999                "buffer is too small (need {} bytes, but got {})",
22000                Self::ENCODED_LEN,
22001                __tmp.remaining(),
22002            )
22003        }
22004        __tmp.put_i32_le(self.operator_latitude);
22005        __tmp.put_i32_le(self.operator_longitude);
22006        __tmp.put_f32_le(self.area_ceiling);
22007        __tmp.put_f32_le(self.area_floor);
22008        __tmp.put_f32_le(self.operator_altitude_geo);
22009        __tmp.put_u32_le(self.timestamp);
22010        __tmp.put_u16_le(self.area_count);
22011        __tmp.put_u16_le(self.area_radius);
22012        __tmp.put_u8(self.target_system);
22013        __tmp.put_u8(self.target_component);
22014        for val in &self.id_or_mac {
22015            __tmp.put_u8(*val);
22016        }
22017        __tmp.put_u8(self.operator_location_type as u8);
22018        __tmp.put_u8(self.classification_type as u8);
22019        __tmp.put_u8(self.category_eu as u8);
22020        __tmp.put_u8(self.class_eu as u8);
22021        if matches!(version, MavlinkVersion::V2) {
22022            let len = __tmp.len();
22023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22024        } else {
22025            __tmp.len()
22026        }
22027    }
22028}
22029#[doc = "id: 61"]
22030#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
22031#[derive(Debug, Clone, PartialEq)]
22032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22034pub struct ATTITUDE_QUATERNION_COV_DATA {
22035    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22036    pub time_usec: u64,
22037    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22038    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22039    pub q: [f32; 4],
22040    #[doc = "Roll angular speed"]
22041    pub rollspeed: f32,
22042    #[doc = "Pitch angular speed"]
22043    pub pitchspeed: f32,
22044    #[doc = "Yaw angular speed"]
22045    pub yawspeed: f32,
22046    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
22047    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22048    pub covariance: [f32; 9],
22049}
22050impl ATTITUDE_QUATERNION_COV_DATA {
22051    pub const ENCODED_LEN: usize = 72usize;
22052    pub const DEFAULT: Self = Self {
22053        time_usec: 0_u64,
22054        q: [0.0_f32; 4usize],
22055        rollspeed: 0.0_f32,
22056        pitchspeed: 0.0_f32,
22057        yawspeed: 0.0_f32,
22058        covariance: [0.0_f32; 9usize],
22059    };
22060    #[cfg(feature = "arbitrary")]
22061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22062        use arbitrary::{Arbitrary, Unstructured};
22063        let mut buf = [0u8; 1024];
22064        rng.fill_bytes(&mut buf);
22065        let mut unstructured = Unstructured::new(&buf);
22066        Self::arbitrary(&mut unstructured).unwrap_or_default()
22067    }
22068}
22069impl Default for ATTITUDE_QUATERNION_COV_DATA {
22070    fn default() -> Self {
22071        Self::DEFAULT.clone()
22072    }
22073}
22074impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
22075    type Message = MavMessage;
22076    const ID: u32 = 61u32;
22077    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
22078    const EXTRA_CRC: u8 = 167u8;
22079    const ENCODED_LEN: usize = 72usize;
22080    fn deser(
22081        _version: MavlinkVersion,
22082        __input: &[u8],
22083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22084        let avail_len = __input.len();
22085        let mut payload_buf = [0; Self::ENCODED_LEN];
22086        let mut buf = if avail_len < Self::ENCODED_LEN {
22087            payload_buf[0..avail_len].copy_from_slice(__input);
22088            Bytes::new(&payload_buf)
22089        } else {
22090            Bytes::new(__input)
22091        };
22092        let mut __struct = Self::default();
22093        __struct.time_usec = buf.get_u64_le();
22094        for v in &mut __struct.q {
22095            let val = buf.get_f32_le();
22096            *v = val;
22097        }
22098        __struct.rollspeed = buf.get_f32_le();
22099        __struct.pitchspeed = buf.get_f32_le();
22100        __struct.yawspeed = buf.get_f32_le();
22101        for v in &mut __struct.covariance {
22102            let val = buf.get_f32_le();
22103            *v = val;
22104        }
22105        Ok(__struct)
22106    }
22107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22108        let mut __tmp = BytesMut::new(bytes);
22109        #[allow(clippy::absurd_extreme_comparisons)]
22110        #[allow(unused_comparisons)]
22111        if __tmp.remaining() < Self::ENCODED_LEN {
22112            panic!(
22113                "buffer is too small (need {} bytes, but got {})",
22114                Self::ENCODED_LEN,
22115                __tmp.remaining(),
22116            )
22117        }
22118        __tmp.put_u64_le(self.time_usec);
22119        for val in &self.q {
22120            __tmp.put_f32_le(*val);
22121        }
22122        __tmp.put_f32_le(self.rollspeed);
22123        __tmp.put_f32_le(self.pitchspeed);
22124        __tmp.put_f32_le(self.yawspeed);
22125        for val in &self.covariance {
22126            __tmp.put_f32_le(*val);
22127        }
22128        if matches!(version, MavlinkVersion::V2) {
22129            let len = __tmp.len();
22130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22131        } else {
22132            __tmp.len()
22133        }
22134    }
22135}
22136#[doc = "id: 0"]
22137#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
22138#[derive(Debug, Clone, PartialEq)]
22139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22141pub struct HEARTBEAT_DATA {
22142    #[doc = "A bitfield for use for autopilot-specific flags"]
22143    pub custom_mode: u32,
22144    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
22145    pub mavtype: MavType,
22146    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
22147    pub autopilot: MavAutopilot,
22148    #[doc = "System mode bitmap."]
22149    pub base_mode: MavModeFlag,
22150    #[doc = "System status flag."]
22151    pub system_status: MavState,
22152    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
22153    pub mavlink_version: u8,
22154}
22155impl HEARTBEAT_DATA {
22156    pub const ENCODED_LEN: usize = 9usize;
22157    pub const DEFAULT: Self = Self {
22158        custom_mode: 0_u32,
22159        mavtype: MavType::DEFAULT,
22160        autopilot: MavAutopilot::DEFAULT,
22161        base_mode: MavModeFlag::DEFAULT,
22162        system_status: MavState::DEFAULT,
22163        mavlink_version: 0_u8,
22164    };
22165    #[cfg(feature = "arbitrary")]
22166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22167        use arbitrary::{Arbitrary, Unstructured};
22168        let mut buf = [0u8; 1024];
22169        rng.fill_bytes(&mut buf);
22170        let mut unstructured = Unstructured::new(&buf);
22171        Self::arbitrary(&mut unstructured).unwrap_or_default()
22172    }
22173}
22174impl Default for HEARTBEAT_DATA {
22175    fn default() -> Self {
22176        Self::DEFAULT.clone()
22177    }
22178}
22179impl MessageData for HEARTBEAT_DATA {
22180    type Message = MavMessage;
22181    const ID: u32 = 0u32;
22182    const NAME: &'static str = "HEARTBEAT";
22183    const EXTRA_CRC: u8 = 50u8;
22184    const ENCODED_LEN: usize = 9usize;
22185    fn deser(
22186        _version: MavlinkVersion,
22187        __input: &[u8],
22188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22189        let avail_len = __input.len();
22190        let mut payload_buf = [0; Self::ENCODED_LEN];
22191        let mut buf = if avail_len < Self::ENCODED_LEN {
22192            payload_buf[0..avail_len].copy_from_slice(__input);
22193            Bytes::new(&payload_buf)
22194        } else {
22195            Bytes::new(__input)
22196        };
22197        let mut __struct = Self::default();
22198        __struct.custom_mode = buf.get_u32_le();
22199        let tmp = buf.get_u8();
22200        __struct.mavtype =
22201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22202                enum_type: "MavType",
22203                value: tmp as u32,
22204            })?;
22205        let tmp = buf.get_u8();
22206        __struct.autopilot =
22207            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22208                enum_type: "MavAutopilot",
22209                value: tmp as u32,
22210            })?;
22211        let tmp = buf.get_u8();
22212        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
22213            ::mavlink_core::error::ParserError::InvalidFlag {
22214                flag_type: "MavModeFlag",
22215                value: tmp as u32,
22216            },
22217        )?;
22218        let tmp = buf.get_u8();
22219        __struct.system_status =
22220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22221                enum_type: "MavState",
22222                value: tmp as u32,
22223            })?;
22224        __struct.mavlink_version = buf.get_u8();
22225        Ok(__struct)
22226    }
22227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22228        let mut __tmp = BytesMut::new(bytes);
22229        #[allow(clippy::absurd_extreme_comparisons)]
22230        #[allow(unused_comparisons)]
22231        if __tmp.remaining() < Self::ENCODED_LEN {
22232            panic!(
22233                "buffer is too small (need {} bytes, but got {})",
22234                Self::ENCODED_LEN,
22235                __tmp.remaining(),
22236            )
22237        }
22238        __tmp.put_u32_le(self.custom_mode);
22239        __tmp.put_u8(self.mavtype as u8);
22240        __tmp.put_u8(self.autopilot as u8);
22241        __tmp.put_u8(self.base_mode.bits());
22242        __tmp.put_u8(self.system_status as u8);
22243        __tmp.put_u8(self.mavlink_version);
22244        if matches!(version, MavlinkVersion::V2) {
22245            let len = __tmp.len();
22246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22247        } else {
22248            __tmp.len()
22249        }
22250    }
22251}
22252#[doc = "id: 192"]
22253#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
22254#[derive(Debug, Clone, PartialEq)]
22255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22257pub struct MAG_CAL_REPORT_DATA {
22258    #[doc = "RMS milligauss residuals."]
22259    pub fitness: f32,
22260    #[doc = "X offset."]
22261    pub ofs_x: f32,
22262    #[doc = "Y offset."]
22263    pub ofs_y: f32,
22264    #[doc = "Z offset."]
22265    pub ofs_z: f32,
22266    #[doc = "X diagonal (matrix 11)."]
22267    pub diag_x: f32,
22268    #[doc = "Y diagonal (matrix 22)."]
22269    pub diag_y: f32,
22270    #[doc = "Z diagonal (matrix 33)."]
22271    pub diag_z: f32,
22272    #[doc = "X off-diagonal (matrix 12 and 21)."]
22273    pub offdiag_x: f32,
22274    #[doc = "Y off-diagonal (matrix 13 and 31)."]
22275    pub offdiag_y: f32,
22276    #[doc = "Z off-diagonal (matrix 32 and 23)."]
22277    pub offdiag_z: f32,
22278    #[doc = "Compass being calibrated."]
22279    pub compass_id: u8,
22280    #[doc = "Bitmask of compasses being calibrated."]
22281    pub cal_mask: u8,
22282    #[doc = "Calibration Status."]
22283    pub cal_status: MagCalStatus,
22284    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
22285    pub autosaved: u8,
22286    #[doc = "Confidence in orientation (higher is better)."]
22287    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22288    pub orientation_confidence: f32,
22289    #[doc = "orientation before calibration."]
22290    #[cfg_attr(feature = "serde", serde(default))]
22291    pub old_orientation: MavSensorOrientation,
22292    #[doc = "orientation after calibration."]
22293    #[cfg_attr(feature = "serde", serde(default))]
22294    pub new_orientation: MavSensorOrientation,
22295    #[doc = "field radius correction factor"]
22296    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22297    pub scale_factor: f32,
22298}
22299impl MAG_CAL_REPORT_DATA {
22300    pub const ENCODED_LEN: usize = 54usize;
22301    pub const DEFAULT: Self = Self {
22302        fitness: 0.0_f32,
22303        ofs_x: 0.0_f32,
22304        ofs_y: 0.0_f32,
22305        ofs_z: 0.0_f32,
22306        diag_x: 0.0_f32,
22307        diag_y: 0.0_f32,
22308        diag_z: 0.0_f32,
22309        offdiag_x: 0.0_f32,
22310        offdiag_y: 0.0_f32,
22311        offdiag_z: 0.0_f32,
22312        compass_id: 0_u8,
22313        cal_mask: 0_u8,
22314        cal_status: MagCalStatus::DEFAULT,
22315        autosaved: 0_u8,
22316        orientation_confidence: 0.0_f32,
22317        old_orientation: MavSensorOrientation::DEFAULT,
22318        new_orientation: MavSensorOrientation::DEFAULT,
22319        scale_factor: 0.0_f32,
22320    };
22321    #[cfg(feature = "arbitrary")]
22322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22323        use arbitrary::{Arbitrary, Unstructured};
22324        let mut buf = [0u8; 1024];
22325        rng.fill_bytes(&mut buf);
22326        let mut unstructured = Unstructured::new(&buf);
22327        Self::arbitrary(&mut unstructured).unwrap_or_default()
22328    }
22329}
22330impl Default for MAG_CAL_REPORT_DATA {
22331    fn default() -> Self {
22332        Self::DEFAULT.clone()
22333    }
22334}
22335impl MessageData for MAG_CAL_REPORT_DATA {
22336    type Message = MavMessage;
22337    const ID: u32 = 192u32;
22338    const NAME: &'static str = "MAG_CAL_REPORT";
22339    const EXTRA_CRC: u8 = 36u8;
22340    const ENCODED_LEN: usize = 54usize;
22341    fn deser(
22342        _version: MavlinkVersion,
22343        __input: &[u8],
22344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22345        let avail_len = __input.len();
22346        let mut payload_buf = [0; Self::ENCODED_LEN];
22347        let mut buf = if avail_len < Self::ENCODED_LEN {
22348            payload_buf[0..avail_len].copy_from_slice(__input);
22349            Bytes::new(&payload_buf)
22350        } else {
22351            Bytes::new(__input)
22352        };
22353        let mut __struct = Self::default();
22354        __struct.fitness = buf.get_f32_le();
22355        __struct.ofs_x = buf.get_f32_le();
22356        __struct.ofs_y = buf.get_f32_le();
22357        __struct.ofs_z = buf.get_f32_le();
22358        __struct.diag_x = buf.get_f32_le();
22359        __struct.diag_y = buf.get_f32_le();
22360        __struct.diag_z = buf.get_f32_le();
22361        __struct.offdiag_x = buf.get_f32_le();
22362        __struct.offdiag_y = buf.get_f32_le();
22363        __struct.offdiag_z = buf.get_f32_le();
22364        __struct.compass_id = buf.get_u8();
22365        __struct.cal_mask = buf.get_u8();
22366        let tmp = buf.get_u8();
22367        __struct.cal_status =
22368            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22369                enum_type: "MagCalStatus",
22370                value: tmp as u32,
22371            })?;
22372        __struct.autosaved = buf.get_u8();
22373        __struct.orientation_confidence = buf.get_f32_le();
22374        let tmp = buf.get_u8();
22375        __struct.old_orientation =
22376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22377                enum_type: "MavSensorOrientation",
22378                value: tmp as u32,
22379            })?;
22380        let tmp = buf.get_u8();
22381        __struct.new_orientation =
22382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22383                enum_type: "MavSensorOrientation",
22384                value: tmp as u32,
22385            })?;
22386        __struct.scale_factor = buf.get_f32_le();
22387        Ok(__struct)
22388    }
22389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22390        let mut __tmp = BytesMut::new(bytes);
22391        #[allow(clippy::absurd_extreme_comparisons)]
22392        #[allow(unused_comparisons)]
22393        if __tmp.remaining() < Self::ENCODED_LEN {
22394            panic!(
22395                "buffer is too small (need {} bytes, but got {})",
22396                Self::ENCODED_LEN,
22397                __tmp.remaining(),
22398            )
22399        }
22400        __tmp.put_f32_le(self.fitness);
22401        __tmp.put_f32_le(self.ofs_x);
22402        __tmp.put_f32_le(self.ofs_y);
22403        __tmp.put_f32_le(self.ofs_z);
22404        __tmp.put_f32_le(self.diag_x);
22405        __tmp.put_f32_le(self.diag_y);
22406        __tmp.put_f32_le(self.diag_z);
22407        __tmp.put_f32_le(self.offdiag_x);
22408        __tmp.put_f32_le(self.offdiag_y);
22409        __tmp.put_f32_le(self.offdiag_z);
22410        __tmp.put_u8(self.compass_id);
22411        __tmp.put_u8(self.cal_mask);
22412        __tmp.put_u8(self.cal_status as u8);
22413        __tmp.put_u8(self.autosaved);
22414        __tmp.put_f32_le(self.orientation_confidence);
22415        __tmp.put_u8(self.old_orientation as u8);
22416        __tmp.put_u8(self.new_orientation as u8);
22417        __tmp.put_f32_le(self.scale_factor);
22418        if matches!(version, MavlinkVersion::V2) {
22419            let len = __tmp.len();
22420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22421        } else {
22422            __tmp.len()
22423        }
22424    }
22425}
22426#[doc = "id: 266"]
22427#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
22428#[derive(Debug, Clone, PartialEq)]
22429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22431pub struct LOGGING_DATA_DATA {
22432    #[doc = "sequence number (can wrap)"]
22433    pub sequence: u16,
22434    #[doc = "system ID of the target"]
22435    pub target_system: u8,
22436    #[doc = "component ID of the target"]
22437    pub target_component: u8,
22438    #[doc = "data length"]
22439    pub length: u8,
22440    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
22441    pub first_message_offset: u8,
22442    #[doc = "logged data"]
22443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22444    pub data: [u8; 249],
22445}
22446impl LOGGING_DATA_DATA {
22447    pub const ENCODED_LEN: usize = 255usize;
22448    pub const DEFAULT: Self = Self {
22449        sequence: 0_u16,
22450        target_system: 0_u8,
22451        target_component: 0_u8,
22452        length: 0_u8,
22453        first_message_offset: 0_u8,
22454        data: [0_u8; 249usize],
22455    };
22456    #[cfg(feature = "arbitrary")]
22457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22458        use arbitrary::{Arbitrary, Unstructured};
22459        let mut buf = [0u8; 1024];
22460        rng.fill_bytes(&mut buf);
22461        let mut unstructured = Unstructured::new(&buf);
22462        Self::arbitrary(&mut unstructured).unwrap_or_default()
22463    }
22464}
22465impl Default for LOGGING_DATA_DATA {
22466    fn default() -> Self {
22467        Self::DEFAULT.clone()
22468    }
22469}
22470impl MessageData for LOGGING_DATA_DATA {
22471    type Message = MavMessage;
22472    const ID: u32 = 266u32;
22473    const NAME: &'static str = "LOGGING_DATA";
22474    const EXTRA_CRC: u8 = 193u8;
22475    const ENCODED_LEN: usize = 255usize;
22476    fn deser(
22477        _version: MavlinkVersion,
22478        __input: &[u8],
22479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22480        let avail_len = __input.len();
22481        let mut payload_buf = [0; Self::ENCODED_LEN];
22482        let mut buf = if avail_len < Self::ENCODED_LEN {
22483            payload_buf[0..avail_len].copy_from_slice(__input);
22484            Bytes::new(&payload_buf)
22485        } else {
22486            Bytes::new(__input)
22487        };
22488        let mut __struct = Self::default();
22489        __struct.sequence = buf.get_u16_le();
22490        __struct.target_system = buf.get_u8();
22491        __struct.target_component = buf.get_u8();
22492        __struct.length = buf.get_u8();
22493        __struct.first_message_offset = buf.get_u8();
22494        for v in &mut __struct.data {
22495            let val = buf.get_u8();
22496            *v = val;
22497        }
22498        Ok(__struct)
22499    }
22500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22501        let mut __tmp = BytesMut::new(bytes);
22502        #[allow(clippy::absurd_extreme_comparisons)]
22503        #[allow(unused_comparisons)]
22504        if __tmp.remaining() < Self::ENCODED_LEN {
22505            panic!(
22506                "buffer is too small (need {} bytes, but got {})",
22507                Self::ENCODED_LEN,
22508                __tmp.remaining(),
22509            )
22510        }
22511        __tmp.put_u16_le(self.sequence);
22512        __tmp.put_u8(self.target_system);
22513        __tmp.put_u8(self.target_component);
22514        __tmp.put_u8(self.length);
22515        __tmp.put_u8(self.first_message_offset);
22516        for val in &self.data {
22517            __tmp.put_u8(*val);
22518        }
22519        if matches!(version, MavlinkVersion::V2) {
22520            let len = __tmp.len();
22521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22522        } else {
22523            __tmp.len()
22524        }
22525    }
22526}
22527#[doc = "id: 8010"]
22528#[doc = "Battery pack monitoring data for Li-Ion batteries."]
22529#[derive(Debug, Clone, PartialEq)]
22530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22532pub struct SENS_BATMON_DATA {
22533    #[doc = "Time since system start"]
22534    pub batmon_timestamp: u64,
22535    #[doc = "Battery pack temperature"]
22536    pub temperature: f32,
22537    #[doc = "Battery monitor safetystatus report bits in Hex"]
22538    pub safetystatus: u32,
22539    #[doc = "Battery monitor operation status report bits in Hex"]
22540    pub operationstatus: u32,
22541    #[doc = "Battery pack voltage"]
22542    pub voltage: u16,
22543    #[doc = "Battery pack current"]
22544    pub current: i16,
22545    #[doc = "Battery monitor status report bits in Hex"]
22546    pub batterystatus: u16,
22547    #[doc = "Battery monitor serial number in Hex"]
22548    pub serialnumber: u16,
22549    #[doc = "Battery pack cell 1 voltage"]
22550    pub cellvoltage1: u16,
22551    #[doc = "Battery pack cell 2 voltage"]
22552    pub cellvoltage2: u16,
22553    #[doc = "Battery pack cell 3 voltage"]
22554    pub cellvoltage3: u16,
22555    #[doc = "Battery pack cell 4 voltage"]
22556    pub cellvoltage4: u16,
22557    #[doc = "Battery pack cell 5 voltage"]
22558    pub cellvoltage5: u16,
22559    #[doc = "Battery pack cell 6 voltage"]
22560    pub cellvoltage6: u16,
22561    #[doc = "Battery pack state-of-charge"]
22562    pub SoC: u8,
22563}
22564impl SENS_BATMON_DATA {
22565    pub const ENCODED_LEN: usize = 41usize;
22566    pub const DEFAULT: Self = Self {
22567        batmon_timestamp: 0_u64,
22568        temperature: 0.0_f32,
22569        safetystatus: 0_u32,
22570        operationstatus: 0_u32,
22571        voltage: 0_u16,
22572        current: 0_i16,
22573        batterystatus: 0_u16,
22574        serialnumber: 0_u16,
22575        cellvoltage1: 0_u16,
22576        cellvoltage2: 0_u16,
22577        cellvoltage3: 0_u16,
22578        cellvoltage4: 0_u16,
22579        cellvoltage5: 0_u16,
22580        cellvoltage6: 0_u16,
22581        SoC: 0_u8,
22582    };
22583    #[cfg(feature = "arbitrary")]
22584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22585        use arbitrary::{Arbitrary, Unstructured};
22586        let mut buf = [0u8; 1024];
22587        rng.fill_bytes(&mut buf);
22588        let mut unstructured = Unstructured::new(&buf);
22589        Self::arbitrary(&mut unstructured).unwrap_or_default()
22590    }
22591}
22592impl Default for SENS_BATMON_DATA {
22593    fn default() -> Self {
22594        Self::DEFAULT.clone()
22595    }
22596}
22597impl MessageData for SENS_BATMON_DATA {
22598    type Message = MavMessage;
22599    const ID: u32 = 8010u32;
22600    const NAME: &'static str = "SENS_BATMON";
22601    const EXTRA_CRC: u8 = 155u8;
22602    const ENCODED_LEN: usize = 41usize;
22603    fn deser(
22604        _version: MavlinkVersion,
22605        __input: &[u8],
22606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22607        let avail_len = __input.len();
22608        let mut payload_buf = [0; Self::ENCODED_LEN];
22609        let mut buf = if avail_len < Self::ENCODED_LEN {
22610            payload_buf[0..avail_len].copy_from_slice(__input);
22611            Bytes::new(&payload_buf)
22612        } else {
22613            Bytes::new(__input)
22614        };
22615        let mut __struct = Self::default();
22616        __struct.batmon_timestamp = buf.get_u64_le();
22617        __struct.temperature = buf.get_f32_le();
22618        __struct.safetystatus = buf.get_u32_le();
22619        __struct.operationstatus = buf.get_u32_le();
22620        __struct.voltage = buf.get_u16_le();
22621        __struct.current = buf.get_i16_le();
22622        __struct.batterystatus = buf.get_u16_le();
22623        __struct.serialnumber = buf.get_u16_le();
22624        __struct.cellvoltage1 = buf.get_u16_le();
22625        __struct.cellvoltage2 = buf.get_u16_le();
22626        __struct.cellvoltage3 = buf.get_u16_le();
22627        __struct.cellvoltage4 = buf.get_u16_le();
22628        __struct.cellvoltage5 = buf.get_u16_le();
22629        __struct.cellvoltage6 = buf.get_u16_le();
22630        __struct.SoC = buf.get_u8();
22631        Ok(__struct)
22632    }
22633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22634        let mut __tmp = BytesMut::new(bytes);
22635        #[allow(clippy::absurd_extreme_comparisons)]
22636        #[allow(unused_comparisons)]
22637        if __tmp.remaining() < Self::ENCODED_LEN {
22638            panic!(
22639                "buffer is too small (need {} bytes, but got {})",
22640                Self::ENCODED_LEN,
22641                __tmp.remaining(),
22642            )
22643        }
22644        __tmp.put_u64_le(self.batmon_timestamp);
22645        __tmp.put_f32_le(self.temperature);
22646        __tmp.put_u32_le(self.safetystatus);
22647        __tmp.put_u32_le(self.operationstatus);
22648        __tmp.put_u16_le(self.voltage);
22649        __tmp.put_i16_le(self.current);
22650        __tmp.put_u16_le(self.batterystatus);
22651        __tmp.put_u16_le(self.serialnumber);
22652        __tmp.put_u16_le(self.cellvoltage1);
22653        __tmp.put_u16_le(self.cellvoltage2);
22654        __tmp.put_u16_le(self.cellvoltage3);
22655        __tmp.put_u16_le(self.cellvoltage4);
22656        __tmp.put_u16_le(self.cellvoltage5);
22657        __tmp.put_u16_le(self.cellvoltage6);
22658        __tmp.put_u8(self.SoC);
22659        if matches!(version, MavlinkVersion::V2) {
22660            let len = __tmp.len();
22661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22662        } else {
22663            __tmp.len()
22664        }
22665    }
22666}
22667#[doc = "id: 8011"]
22668#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
22669#[derive(Debug, Clone, PartialEq)]
22670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22672pub struct FW_SOARING_DATA_DATA {
22673    #[doc = "Timestamp"]
22674    pub timestamp: u64,
22675    #[doc = "Timestamp since last mode change"]
22676    pub timestampModeChanged: u64,
22677    #[doc = "Thermal core updraft strength"]
22678    pub xW: f32,
22679    #[doc = "Thermal radius"]
22680    pub xR: f32,
22681    #[doc = "Thermal center latitude"]
22682    pub xLat: f32,
22683    #[doc = "Thermal center longitude"]
22684    pub xLon: f32,
22685    #[doc = "Variance W"]
22686    pub VarW: f32,
22687    #[doc = "Variance R"]
22688    pub VarR: f32,
22689    #[doc = "Variance Lat"]
22690    pub VarLat: f32,
22691    #[doc = "Variance Lon"]
22692    pub VarLon: f32,
22693    #[doc = "Suggested loiter radius"]
22694    pub LoiterRadius: f32,
22695    #[doc = "Suggested loiter direction"]
22696    pub LoiterDirection: f32,
22697    #[doc = "Distance to soar point"]
22698    pub DistToSoarPoint: f32,
22699    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
22700    pub vSinkExp: f32,
22701    #[doc = "Measurement / updraft speed at current/local airplane position"]
22702    pub z1_LocalUpdraftSpeed: f32,
22703    #[doc = "Measurement / roll angle tracking error"]
22704    pub z2_DeltaRoll: f32,
22705    #[doc = "Expected measurement 1"]
22706    pub z1_exp: f32,
22707    #[doc = "Expected measurement 2"]
22708    pub z2_exp: f32,
22709    #[doc = "Thermal drift (from estimator prediction step only)"]
22710    pub ThermalGSNorth: f32,
22711    #[doc = "Thermal drift (from estimator prediction step only)"]
22712    pub ThermalGSEast: f32,
22713    #[doc = "Total specific energy change (filtered)"]
22714    pub TSE_dot: f32,
22715    #[doc = "Debug variable 1"]
22716    pub DebugVar1: f32,
22717    #[doc = "Debug variable 2"]
22718    pub DebugVar2: f32,
22719    #[doc = "Control Mode [-]"]
22720    pub ControlMode: u8,
22721    #[doc = "Data valid [-]"]
22722    pub valid: u8,
22723}
22724impl FW_SOARING_DATA_DATA {
22725    pub const ENCODED_LEN: usize = 102usize;
22726    pub const DEFAULT: Self = Self {
22727        timestamp: 0_u64,
22728        timestampModeChanged: 0_u64,
22729        xW: 0.0_f32,
22730        xR: 0.0_f32,
22731        xLat: 0.0_f32,
22732        xLon: 0.0_f32,
22733        VarW: 0.0_f32,
22734        VarR: 0.0_f32,
22735        VarLat: 0.0_f32,
22736        VarLon: 0.0_f32,
22737        LoiterRadius: 0.0_f32,
22738        LoiterDirection: 0.0_f32,
22739        DistToSoarPoint: 0.0_f32,
22740        vSinkExp: 0.0_f32,
22741        z1_LocalUpdraftSpeed: 0.0_f32,
22742        z2_DeltaRoll: 0.0_f32,
22743        z1_exp: 0.0_f32,
22744        z2_exp: 0.0_f32,
22745        ThermalGSNorth: 0.0_f32,
22746        ThermalGSEast: 0.0_f32,
22747        TSE_dot: 0.0_f32,
22748        DebugVar1: 0.0_f32,
22749        DebugVar2: 0.0_f32,
22750        ControlMode: 0_u8,
22751        valid: 0_u8,
22752    };
22753    #[cfg(feature = "arbitrary")]
22754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22755        use arbitrary::{Arbitrary, Unstructured};
22756        let mut buf = [0u8; 1024];
22757        rng.fill_bytes(&mut buf);
22758        let mut unstructured = Unstructured::new(&buf);
22759        Self::arbitrary(&mut unstructured).unwrap_or_default()
22760    }
22761}
22762impl Default for FW_SOARING_DATA_DATA {
22763    fn default() -> Self {
22764        Self::DEFAULT.clone()
22765    }
22766}
22767impl MessageData for FW_SOARING_DATA_DATA {
22768    type Message = MavMessage;
22769    const ID: u32 = 8011u32;
22770    const NAME: &'static str = "FW_SOARING_DATA";
22771    const EXTRA_CRC: u8 = 20u8;
22772    const ENCODED_LEN: usize = 102usize;
22773    fn deser(
22774        _version: MavlinkVersion,
22775        __input: &[u8],
22776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22777        let avail_len = __input.len();
22778        let mut payload_buf = [0; Self::ENCODED_LEN];
22779        let mut buf = if avail_len < Self::ENCODED_LEN {
22780            payload_buf[0..avail_len].copy_from_slice(__input);
22781            Bytes::new(&payload_buf)
22782        } else {
22783            Bytes::new(__input)
22784        };
22785        let mut __struct = Self::default();
22786        __struct.timestamp = buf.get_u64_le();
22787        __struct.timestampModeChanged = buf.get_u64_le();
22788        __struct.xW = buf.get_f32_le();
22789        __struct.xR = buf.get_f32_le();
22790        __struct.xLat = buf.get_f32_le();
22791        __struct.xLon = buf.get_f32_le();
22792        __struct.VarW = buf.get_f32_le();
22793        __struct.VarR = buf.get_f32_le();
22794        __struct.VarLat = buf.get_f32_le();
22795        __struct.VarLon = buf.get_f32_le();
22796        __struct.LoiterRadius = buf.get_f32_le();
22797        __struct.LoiterDirection = buf.get_f32_le();
22798        __struct.DistToSoarPoint = buf.get_f32_le();
22799        __struct.vSinkExp = buf.get_f32_le();
22800        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le();
22801        __struct.z2_DeltaRoll = buf.get_f32_le();
22802        __struct.z1_exp = buf.get_f32_le();
22803        __struct.z2_exp = buf.get_f32_le();
22804        __struct.ThermalGSNorth = buf.get_f32_le();
22805        __struct.ThermalGSEast = buf.get_f32_le();
22806        __struct.TSE_dot = buf.get_f32_le();
22807        __struct.DebugVar1 = buf.get_f32_le();
22808        __struct.DebugVar2 = buf.get_f32_le();
22809        __struct.ControlMode = buf.get_u8();
22810        __struct.valid = buf.get_u8();
22811        Ok(__struct)
22812    }
22813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22814        let mut __tmp = BytesMut::new(bytes);
22815        #[allow(clippy::absurd_extreme_comparisons)]
22816        #[allow(unused_comparisons)]
22817        if __tmp.remaining() < Self::ENCODED_LEN {
22818            panic!(
22819                "buffer is too small (need {} bytes, but got {})",
22820                Self::ENCODED_LEN,
22821                __tmp.remaining(),
22822            )
22823        }
22824        __tmp.put_u64_le(self.timestamp);
22825        __tmp.put_u64_le(self.timestampModeChanged);
22826        __tmp.put_f32_le(self.xW);
22827        __tmp.put_f32_le(self.xR);
22828        __tmp.put_f32_le(self.xLat);
22829        __tmp.put_f32_le(self.xLon);
22830        __tmp.put_f32_le(self.VarW);
22831        __tmp.put_f32_le(self.VarR);
22832        __tmp.put_f32_le(self.VarLat);
22833        __tmp.put_f32_le(self.VarLon);
22834        __tmp.put_f32_le(self.LoiterRadius);
22835        __tmp.put_f32_le(self.LoiterDirection);
22836        __tmp.put_f32_le(self.DistToSoarPoint);
22837        __tmp.put_f32_le(self.vSinkExp);
22838        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
22839        __tmp.put_f32_le(self.z2_DeltaRoll);
22840        __tmp.put_f32_le(self.z1_exp);
22841        __tmp.put_f32_le(self.z2_exp);
22842        __tmp.put_f32_le(self.ThermalGSNorth);
22843        __tmp.put_f32_le(self.ThermalGSEast);
22844        __tmp.put_f32_le(self.TSE_dot);
22845        __tmp.put_f32_le(self.DebugVar1);
22846        __tmp.put_f32_le(self.DebugVar2);
22847        __tmp.put_u8(self.ControlMode);
22848        __tmp.put_u8(self.valid);
22849        if matches!(version, MavlinkVersion::V2) {
22850            let len = __tmp.len();
22851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22852        } else {
22853            __tmp.len()
22854        }
22855    }
22856}
22857#[doc = "id: 30"]
22858#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
22859#[derive(Debug, Clone, PartialEq)]
22860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22862pub struct ATTITUDE_DATA {
22863    #[doc = "Timestamp (time since system boot)."]
22864    pub time_boot_ms: u32,
22865    #[doc = "Roll angle (-pi..+pi)"]
22866    pub roll: f32,
22867    #[doc = "Pitch angle (-pi..+pi)"]
22868    pub pitch: f32,
22869    #[doc = "Yaw angle (-pi..+pi)"]
22870    pub yaw: f32,
22871    #[doc = "Roll angular speed"]
22872    pub rollspeed: f32,
22873    #[doc = "Pitch angular speed"]
22874    pub pitchspeed: f32,
22875    #[doc = "Yaw angular speed"]
22876    pub yawspeed: f32,
22877}
22878impl ATTITUDE_DATA {
22879    pub const ENCODED_LEN: usize = 28usize;
22880    pub const DEFAULT: Self = Self {
22881        time_boot_ms: 0_u32,
22882        roll: 0.0_f32,
22883        pitch: 0.0_f32,
22884        yaw: 0.0_f32,
22885        rollspeed: 0.0_f32,
22886        pitchspeed: 0.0_f32,
22887        yawspeed: 0.0_f32,
22888    };
22889    #[cfg(feature = "arbitrary")]
22890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22891        use arbitrary::{Arbitrary, Unstructured};
22892        let mut buf = [0u8; 1024];
22893        rng.fill_bytes(&mut buf);
22894        let mut unstructured = Unstructured::new(&buf);
22895        Self::arbitrary(&mut unstructured).unwrap_or_default()
22896    }
22897}
22898impl Default for ATTITUDE_DATA {
22899    fn default() -> Self {
22900        Self::DEFAULT.clone()
22901    }
22902}
22903impl MessageData for ATTITUDE_DATA {
22904    type Message = MavMessage;
22905    const ID: u32 = 30u32;
22906    const NAME: &'static str = "ATTITUDE";
22907    const EXTRA_CRC: u8 = 39u8;
22908    const ENCODED_LEN: usize = 28usize;
22909    fn deser(
22910        _version: MavlinkVersion,
22911        __input: &[u8],
22912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22913        let avail_len = __input.len();
22914        let mut payload_buf = [0; Self::ENCODED_LEN];
22915        let mut buf = if avail_len < Self::ENCODED_LEN {
22916            payload_buf[0..avail_len].copy_from_slice(__input);
22917            Bytes::new(&payload_buf)
22918        } else {
22919            Bytes::new(__input)
22920        };
22921        let mut __struct = Self::default();
22922        __struct.time_boot_ms = buf.get_u32_le();
22923        __struct.roll = buf.get_f32_le();
22924        __struct.pitch = buf.get_f32_le();
22925        __struct.yaw = buf.get_f32_le();
22926        __struct.rollspeed = buf.get_f32_le();
22927        __struct.pitchspeed = buf.get_f32_le();
22928        __struct.yawspeed = buf.get_f32_le();
22929        Ok(__struct)
22930    }
22931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22932        let mut __tmp = BytesMut::new(bytes);
22933        #[allow(clippy::absurd_extreme_comparisons)]
22934        #[allow(unused_comparisons)]
22935        if __tmp.remaining() < Self::ENCODED_LEN {
22936            panic!(
22937                "buffer is too small (need {} bytes, but got {})",
22938                Self::ENCODED_LEN,
22939                __tmp.remaining(),
22940            )
22941        }
22942        __tmp.put_u32_le(self.time_boot_ms);
22943        __tmp.put_f32_le(self.roll);
22944        __tmp.put_f32_le(self.pitch);
22945        __tmp.put_f32_le(self.yaw);
22946        __tmp.put_f32_le(self.rollspeed);
22947        __tmp.put_f32_le(self.pitchspeed);
22948        __tmp.put_f32_le(self.yawspeed);
22949        if matches!(version, MavlinkVersion::V2) {
22950            let len = __tmp.len();
22951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22952        } else {
22953            __tmp.len()
22954        }
22955    }
22956}
22957#[doc = "id: 299"]
22958#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
22959#[derive(Debug, Clone, PartialEq)]
22960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22962pub struct WIFI_CONFIG_AP_DATA {
22963    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
22964    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22965    pub ssid: [u8; 32],
22966    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
22967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22968    pub password: [u8; 64],
22969    #[doc = "WiFi Mode."]
22970    #[cfg_attr(feature = "serde", serde(default))]
22971    pub mode: WifiConfigApMode,
22972    #[doc = "Message acceptance response (sent back to GS)."]
22973    #[cfg_attr(feature = "serde", serde(default))]
22974    pub response: WifiConfigApResponse,
22975}
22976impl WIFI_CONFIG_AP_DATA {
22977    pub const ENCODED_LEN: usize = 98usize;
22978    pub const DEFAULT: Self = Self {
22979        ssid: [0_u8; 32usize],
22980        password: [0_u8; 64usize],
22981        mode: WifiConfigApMode::DEFAULT,
22982        response: WifiConfigApResponse::DEFAULT,
22983    };
22984    #[cfg(feature = "arbitrary")]
22985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22986        use arbitrary::{Arbitrary, Unstructured};
22987        let mut buf = [0u8; 1024];
22988        rng.fill_bytes(&mut buf);
22989        let mut unstructured = Unstructured::new(&buf);
22990        Self::arbitrary(&mut unstructured).unwrap_or_default()
22991    }
22992}
22993impl Default for WIFI_CONFIG_AP_DATA {
22994    fn default() -> Self {
22995        Self::DEFAULT.clone()
22996    }
22997}
22998impl MessageData for WIFI_CONFIG_AP_DATA {
22999    type Message = MavMessage;
23000    const ID: u32 = 299u32;
23001    const NAME: &'static str = "WIFI_CONFIG_AP";
23002    const EXTRA_CRC: u8 = 19u8;
23003    const ENCODED_LEN: usize = 98usize;
23004    fn deser(
23005        _version: MavlinkVersion,
23006        __input: &[u8],
23007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23008        let avail_len = __input.len();
23009        let mut payload_buf = [0; Self::ENCODED_LEN];
23010        let mut buf = if avail_len < Self::ENCODED_LEN {
23011            payload_buf[0..avail_len].copy_from_slice(__input);
23012            Bytes::new(&payload_buf)
23013        } else {
23014            Bytes::new(__input)
23015        };
23016        let mut __struct = Self::default();
23017        for v in &mut __struct.ssid {
23018            let val = buf.get_u8();
23019            *v = val;
23020        }
23021        for v in &mut __struct.password {
23022            let val = buf.get_u8();
23023            *v = val;
23024        }
23025        let tmp = buf.get_i8();
23026        __struct.mode =
23027            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23028                enum_type: "WifiConfigApMode",
23029                value: tmp as u32,
23030            })?;
23031        let tmp = buf.get_i8();
23032        __struct.response =
23033            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23034                enum_type: "WifiConfigApResponse",
23035                value: tmp as u32,
23036            })?;
23037        Ok(__struct)
23038    }
23039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23040        let mut __tmp = BytesMut::new(bytes);
23041        #[allow(clippy::absurd_extreme_comparisons)]
23042        #[allow(unused_comparisons)]
23043        if __tmp.remaining() < Self::ENCODED_LEN {
23044            panic!(
23045                "buffer is too small (need {} bytes, but got {})",
23046                Self::ENCODED_LEN,
23047                __tmp.remaining(),
23048            )
23049        }
23050        for val in &self.ssid {
23051            __tmp.put_u8(*val);
23052        }
23053        for val in &self.password {
23054            __tmp.put_u8(*val);
23055        }
23056        __tmp.put_i8(self.mode as i8);
23057        __tmp.put_i8(self.response as i8);
23058        if matches!(version, MavlinkVersion::V2) {
23059            let len = __tmp.len();
23060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23061        } else {
23062            __tmp.len()
23063        }
23064    }
23065}
23066#[doc = "id: 41"]
23067#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
23068#[derive(Debug, Clone, PartialEq)]
23069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23071pub struct MISSION_SET_CURRENT_DATA {
23072    #[doc = "Sequence"]
23073    pub seq: u16,
23074    #[doc = "System ID"]
23075    pub target_system: u8,
23076    #[doc = "Component ID"]
23077    pub target_component: u8,
23078}
23079impl MISSION_SET_CURRENT_DATA {
23080    pub const ENCODED_LEN: usize = 4usize;
23081    pub const DEFAULT: Self = Self {
23082        seq: 0_u16,
23083        target_system: 0_u8,
23084        target_component: 0_u8,
23085    };
23086    #[cfg(feature = "arbitrary")]
23087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23088        use arbitrary::{Arbitrary, Unstructured};
23089        let mut buf = [0u8; 1024];
23090        rng.fill_bytes(&mut buf);
23091        let mut unstructured = Unstructured::new(&buf);
23092        Self::arbitrary(&mut unstructured).unwrap_or_default()
23093    }
23094}
23095impl Default for MISSION_SET_CURRENT_DATA {
23096    fn default() -> Self {
23097        Self::DEFAULT.clone()
23098    }
23099}
23100impl MessageData for MISSION_SET_CURRENT_DATA {
23101    type Message = MavMessage;
23102    const ID: u32 = 41u32;
23103    const NAME: &'static str = "MISSION_SET_CURRENT";
23104    const EXTRA_CRC: u8 = 28u8;
23105    const ENCODED_LEN: usize = 4usize;
23106    fn deser(
23107        _version: MavlinkVersion,
23108        __input: &[u8],
23109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23110        let avail_len = __input.len();
23111        let mut payload_buf = [0; Self::ENCODED_LEN];
23112        let mut buf = if avail_len < Self::ENCODED_LEN {
23113            payload_buf[0..avail_len].copy_from_slice(__input);
23114            Bytes::new(&payload_buf)
23115        } else {
23116            Bytes::new(__input)
23117        };
23118        let mut __struct = Self::default();
23119        __struct.seq = buf.get_u16_le();
23120        __struct.target_system = buf.get_u8();
23121        __struct.target_component = buf.get_u8();
23122        Ok(__struct)
23123    }
23124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23125        let mut __tmp = BytesMut::new(bytes);
23126        #[allow(clippy::absurd_extreme_comparisons)]
23127        #[allow(unused_comparisons)]
23128        if __tmp.remaining() < Self::ENCODED_LEN {
23129            panic!(
23130                "buffer is too small (need {} bytes, but got {})",
23131                Self::ENCODED_LEN,
23132                __tmp.remaining(),
23133            )
23134        }
23135        __tmp.put_u16_le(self.seq);
23136        __tmp.put_u8(self.target_system);
23137        __tmp.put_u8(self.target_component);
23138        if matches!(version, MavlinkVersion::V2) {
23139            let len = __tmp.len();
23140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23141        } else {
23142            __tmp.len()
23143        }
23144    }
23145}
23146#[doc = "id: 380"]
23147#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
23148#[derive(Debug, Clone, PartialEq)]
23149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23151pub struct TIME_ESTIMATE_TO_TARGET_DATA {
23152    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
23153    pub safe_return: i32,
23154    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
23155    pub land: i32,
23156    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
23157    pub mission_next_item: i32,
23158    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
23159    pub mission_end: i32,
23160    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
23161    pub commanded_action: i32,
23162}
23163impl TIME_ESTIMATE_TO_TARGET_DATA {
23164    pub const ENCODED_LEN: usize = 20usize;
23165    pub const DEFAULT: Self = Self {
23166        safe_return: 0_i32,
23167        land: 0_i32,
23168        mission_next_item: 0_i32,
23169        mission_end: 0_i32,
23170        commanded_action: 0_i32,
23171    };
23172    #[cfg(feature = "arbitrary")]
23173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23174        use arbitrary::{Arbitrary, Unstructured};
23175        let mut buf = [0u8; 1024];
23176        rng.fill_bytes(&mut buf);
23177        let mut unstructured = Unstructured::new(&buf);
23178        Self::arbitrary(&mut unstructured).unwrap_or_default()
23179    }
23180}
23181impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
23182    fn default() -> Self {
23183        Self::DEFAULT.clone()
23184    }
23185}
23186impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
23187    type Message = MavMessage;
23188    const ID: u32 = 380u32;
23189    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
23190    const EXTRA_CRC: u8 = 232u8;
23191    const ENCODED_LEN: usize = 20usize;
23192    fn deser(
23193        _version: MavlinkVersion,
23194        __input: &[u8],
23195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23196        let avail_len = __input.len();
23197        let mut payload_buf = [0; Self::ENCODED_LEN];
23198        let mut buf = if avail_len < Self::ENCODED_LEN {
23199            payload_buf[0..avail_len].copy_from_slice(__input);
23200            Bytes::new(&payload_buf)
23201        } else {
23202            Bytes::new(__input)
23203        };
23204        let mut __struct = Self::default();
23205        __struct.safe_return = buf.get_i32_le();
23206        __struct.land = buf.get_i32_le();
23207        __struct.mission_next_item = buf.get_i32_le();
23208        __struct.mission_end = buf.get_i32_le();
23209        __struct.commanded_action = buf.get_i32_le();
23210        Ok(__struct)
23211    }
23212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23213        let mut __tmp = BytesMut::new(bytes);
23214        #[allow(clippy::absurd_extreme_comparisons)]
23215        #[allow(unused_comparisons)]
23216        if __tmp.remaining() < Self::ENCODED_LEN {
23217            panic!(
23218                "buffer is too small (need {} bytes, but got {})",
23219                Self::ENCODED_LEN,
23220                __tmp.remaining(),
23221            )
23222        }
23223        __tmp.put_i32_le(self.safe_return);
23224        __tmp.put_i32_le(self.land);
23225        __tmp.put_i32_le(self.mission_next_item);
23226        __tmp.put_i32_le(self.mission_end);
23227        __tmp.put_i32_le(self.commanded_action);
23228        if matches!(version, MavlinkVersion::V2) {
23229            let len = __tmp.len();
23230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23231        } else {
23232            __tmp.len()
23233        }
23234    }
23235}
23236#[doc = "id: 332"]
23237#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
23238#[derive(Debug, Clone, PartialEq)]
23239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23241pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
23242    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23243    pub time_usec: u64,
23244    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
23245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23246    pub pos_x: [f32; 5],
23247    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
23248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23249    pub pos_y: [f32; 5],
23250    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
23251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23252    pub pos_z: [f32; 5],
23253    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
23254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23255    pub vel_x: [f32; 5],
23256    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
23257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23258    pub vel_y: [f32; 5],
23259    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
23260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23261    pub vel_z: [f32; 5],
23262    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
23263    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23264    pub acc_x: [f32; 5],
23265    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
23266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23267    pub acc_y: [f32; 5],
23268    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
23269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23270    pub acc_z: [f32; 5],
23271    #[doc = "Yaw angle, set to NaN if not being used"]
23272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23273    pub pos_yaw: [f32; 5],
23274    #[doc = "Yaw rate, set to NaN if not being used"]
23275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23276    pub vel_yaw: [f32; 5],
23277    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
23278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23279    pub command: [u16; 5],
23280    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
23281    pub valid_points: u8,
23282}
23283impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
23284    pub const ENCODED_LEN: usize = 239usize;
23285    pub const DEFAULT: Self = Self {
23286        time_usec: 0_u64,
23287        pos_x: [0.0_f32; 5usize],
23288        pos_y: [0.0_f32; 5usize],
23289        pos_z: [0.0_f32; 5usize],
23290        vel_x: [0.0_f32; 5usize],
23291        vel_y: [0.0_f32; 5usize],
23292        vel_z: [0.0_f32; 5usize],
23293        acc_x: [0.0_f32; 5usize],
23294        acc_y: [0.0_f32; 5usize],
23295        acc_z: [0.0_f32; 5usize],
23296        pos_yaw: [0.0_f32; 5usize],
23297        vel_yaw: [0.0_f32; 5usize],
23298        command: [0_u16; 5usize],
23299        valid_points: 0_u8,
23300    };
23301    #[cfg(feature = "arbitrary")]
23302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23303        use arbitrary::{Arbitrary, Unstructured};
23304        let mut buf = [0u8; 1024];
23305        rng.fill_bytes(&mut buf);
23306        let mut unstructured = Unstructured::new(&buf);
23307        Self::arbitrary(&mut unstructured).unwrap_or_default()
23308    }
23309}
23310impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
23311    fn default() -> Self {
23312        Self::DEFAULT.clone()
23313    }
23314}
23315impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
23316    type Message = MavMessage;
23317    const ID: u32 = 332u32;
23318    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
23319    const EXTRA_CRC: u8 = 236u8;
23320    const ENCODED_LEN: usize = 239usize;
23321    fn deser(
23322        _version: MavlinkVersion,
23323        __input: &[u8],
23324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23325        let avail_len = __input.len();
23326        let mut payload_buf = [0; Self::ENCODED_LEN];
23327        let mut buf = if avail_len < Self::ENCODED_LEN {
23328            payload_buf[0..avail_len].copy_from_slice(__input);
23329            Bytes::new(&payload_buf)
23330        } else {
23331            Bytes::new(__input)
23332        };
23333        let mut __struct = Self::default();
23334        __struct.time_usec = buf.get_u64_le();
23335        for v in &mut __struct.pos_x {
23336            let val = buf.get_f32_le();
23337            *v = val;
23338        }
23339        for v in &mut __struct.pos_y {
23340            let val = buf.get_f32_le();
23341            *v = val;
23342        }
23343        for v in &mut __struct.pos_z {
23344            let val = buf.get_f32_le();
23345            *v = val;
23346        }
23347        for v in &mut __struct.vel_x {
23348            let val = buf.get_f32_le();
23349            *v = val;
23350        }
23351        for v in &mut __struct.vel_y {
23352            let val = buf.get_f32_le();
23353            *v = val;
23354        }
23355        for v in &mut __struct.vel_z {
23356            let val = buf.get_f32_le();
23357            *v = val;
23358        }
23359        for v in &mut __struct.acc_x {
23360            let val = buf.get_f32_le();
23361            *v = val;
23362        }
23363        for v in &mut __struct.acc_y {
23364            let val = buf.get_f32_le();
23365            *v = val;
23366        }
23367        for v in &mut __struct.acc_z {
23368            let val = buf.get_f32_le();
23369            *v = val;
23370        }
23371        for v in &mut __struct.pos_yaw {
23372            let val = buf.get_f32_le();
23373            *v = val;
23374        }
23375        for v in &mut __struct.vel_yaw {
23376            let val = buf.get_f32_le();
23377            *v = val;
23378        }
23379        for v in &mut __struct.command {
23380            let val = buf.get_u16_le();
23381            *v = val;
23382        }
23383        __struct.valid_points = buf.get_u8();
23384        Ok(__struct)
23385    }
23386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23387        let mut __tmp = BytesMut::new(bytes);
23388        #[allow(clippy::absurd_extreme_comparisons)]
23389        #[allow(unused_comparisons)]
23390        if __tmp.remaining() < Self::ENCODED_LEN {
23391            panic!(
23392                "buffer is too small (need {} bytes, but got {})",
23393                Self::ENCODED_LEN,
23394                __tmp.remaining(),
23395            )
23396        }
23397        __tmp.put_u64_le(self.time_usec);
23398        for val in &self.pos_x {
23399            __tmp.put_f32_le(*val);
23400        }
23401        for val in &self.pos_y {
23402            __tmp.put_f32_le(*val);
23403        }
23404        for val in &self.pos_z {
23405            __tmp.put_f32_le(*val);
23406        }
23407        for val in &self.vel_x {
23408            __tmp.put_f32_le(*val);
23409        }
23410        for val in &self.vel_y {
23411            __tmp.put_f32_le(*val);
23412        }
23413        for val in &self.vel_z {
23414            __tmp.put_f32_le(*val);
23415        }
23416        for val in &self.acc_x {
23417            __tmp.put_f32_le(*val);
23418        }
23419        for val in &self.acc_y {
23420            __tmp.put_f32_le(*val);
23421        }
23422        for val in &self.acc_z {
23423            __tmp.put_f32_le(*val);
23424        }
23425        for val in &self.pos_yaw {
23426            __tmp.put_f32_le(*val);
23427        }
23428        for val in &self.vel_yaw {
23429            __tmp.put_f32_le(*val);
23430        }
23431        for val in &self.command {
23432            __tmp.put_u16_le(*val);
23433        }
23434        __tmp.put_u8(self.valid_points);
23435        if matches!(version, MavlinkVersion::V2) {
23436            let len = __tmp.len();
23437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23438        } else {
23439            __tmp.len()
23440        }
23441    }
23442}
23443#[doc = "id: 301"]
23444#[doc = "The location and information of an AIS vessel."]
23445#[derive(Debug, Clone, PartialEq)]
23446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23448pub struct AIS_VESSEL_DATA {
23449    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
23450    pub MMSI: u32,
23451    #[doc = "Latitude"]
23452    pub lat: i32,
23453    #[doc = "Longitude"]
23454    pub lon: i32,
23455    #[doc = "Course over ground"]
23456    pub COG: u16,
23457    #[doc = "True heading"]
23458    pub heading: u16,
23459    #[doc = "Speed over ground"]
23460    pub velocity: u16,
23461    #[doc = "Distance from lat/lon location to bow"]
23462    pub dimension_bow: u16,
23463    #[doc = "Distance from lat/lon location to stern"]
23464    pub dimension_stern: u16,
23465    #[doc = "Time since last communication in seconds"]
23466    pub tslc: u16,
23467    #[doc = "Bitmask to indicate various statuses including valid data fields"]
23468    pub flags: AisFlags,
23469    #[doc = "Turn rate"]
23470    pub turn_rate: i8,
23471    #[doc = "Navigational status"]
23472    pub navigational_status: AisNavStatus,
23473    #[doc = "Type of vessels"]
23474    pub mavtype: AisType,
23475    #[doc = "Distance from lat/lon location to port side"]
23476    pub dimension_port: u8,
23477    #[doc = "Distance from lat/lon location to starboard side"]
23478    pub dimension_starboard: u8,
23479    #[doc = "The vessel callsign"]
23480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23481    pub callsign: [u8; 7],
23482    #[doc = "The vessel name"]
23483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23484    pub name: [u8; 20],
23485}
23486impl AIS_VESSEL_DATA {
23487    pub const ENCODED_LEN: usize = 58usize;
23488    pub const DEFAULT: Self = Self {
23489        MMSI: 0_u32,
23490        lat: 0_i32,
23491        lon: 0_i32,
23492        COG: 0_u16,
23493        heading: 0_u16,
23494        velocity: 0_u16,
23495        dimension_bow: 0_u16,
23496        dimension_stern: 0_u16,
23497        tslc: 0_u16,
23498        flags: AisFlags::DEFAULT,
23499        turn_rate: 0_i8,
23500        navigational_status: AisNavStatus::DEFAULT,
23501        mavtype: AisType::DEFAULT,
23502        dimension_port: 0_u8,
23503        dimension_starboard: 0_u8,
23504        callsign: [0_u8; 7usize],
23505        name: [0_u8; 20usize],
23506    };
23507    #[cfg(feature = "arbitrary")]
23508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23509        use arbitrary::{Arbitrary, Unstructured};
23510        let mut buf = [0u8; 1024];
23511        rng.fill_bytes(&mut buf);
23512        let mut unstructured = Unstructured::new(&buf);
23513        Self::arbitrary(&mut unstructured).unwrap_or_default()
23514    }
23515}
23516impl Default for AIS_VESSEL_DATA {
23517    fn default() -> Self {
23518        Self::DEFAULT.clone()
23519    }
23520}
23521impl MessageData for AIS_VESSEL_DATA {
23522    type Message = MavMessage;
23523    const ID: u32 = 301u32;
23524    const NAME: &'static str = "AIS_VESSEL";
23525    const EXTRA_CRC: u8 = 243u8;
23526    const ENCODED_LEN: usize = 58usize;
23527    fn deser(
23528        _version: MavlinkVersion,
23529        __input: &[u8],
23530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23531        let avail_len = __input.len();
23532        let mut payload_buf = [0; Self::ENCODED_LEN];
23533        let mut buf = if avail_len < Self::ENCODED_LEN {
23534            payload_buf[0..avail_len].copy_from_slice(__input);
23535            Bytes::new(&payload_buf)
23536        } else {
23537            Bytes::new(__input)
23538        };
23539        let mut __struct = Self::default();
23540        __struct.MMSI = buf.get_u32_le();
23541        __struct.lat = buf.get_i32_le();
23542        __struct.lon = buf.get_i32_le();
23543        __struct.COG = buf.get_u16_le();
23544        __struct.heading = buf.get_u16_le();
23545        __struct.velocity = buf.get_u16_le();
23546        __struct.dimension_bow = buf.get_u16_le();
23547        __struct.dimension_stern = buf.get_u16_le();
23548        __struct.tslc = buf.get_u16_le();
23549        let tmp = buf.get_u16_le();
23550        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
23551            ::mavlink_core::error::ParserError::InvalidFlag {
23552                flag_type: "AisFlags",
23553                value: tmp as u32,
23554            },
23555        )?;
23556        __struct.turn_rate = buf.get_i8();
23557        let tmp = buf.get_u8();
23558        __struct.navigational_status =
23559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23560                enum_type: "AisNavStatus",
23561                value: tmp as u32,
23562            })?;
23563        let tmp = buf.get_u8();
23564        __struct.mavtype =
23565            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23566                enum_type: "AisType",
23567                value: tmp as u32,
23568            })?;
23569        __struct.dimension_port = buf.get_u8();
23570        __struct.dimension_starboard = buf.get_u8();
23571        for v in &mut __struct.callsign {
23572            let val = buf.get_u8();
23573            *v = val;
23574        }
23575        for v in &mut __struct.name {
23576            let val = buf.get_u8();
23577            *v = val;
23578        }
23579        Ok(__struct)
23580    }
23581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23582        let mut __tmp = BytesMut::new(bytes);
23583        #[allow(clippy::absurd_extreme_comparisons)]
23584        #[allow(unused_comparisons)]
23585        if __tmp.remaining() < Self::ENCODED_LEN {
23586            panic!(
23587                "buffer is too small (need {} bytes, but got {})",
23588                Self::ENCODED_LEN,
23589                __tmp.remaining(),
23590            )
23591        }
23592        __tmp.put_u32_le(self.MMSI);
23593        __tmp.put_i32_le(self.lat);
23594        __tmp.put_i32_le(self.lon);
23595        __tmp.put_u16_le(self.COG);
23596        __tmp.put_u16_le(self.heading);
23597        __tmp.put_u16_le(self.velocity);
23598        __tmp.put_u16_le(self.dimension_bow);
23599        __tmp.put_u16_le(self.dimension_stern);
23600        __tmp.put_u16_le(self.tslc);
23601        __tmp.put_u16_le(self.flags.bits());
23602        __tmp.put_i8(self.turn_rate);
23603        __tmp.put_u8(self.navigational_status as u8);
23604        __tmp.put_u8(self.mavtype as u8);
23605        __tmp.put_u8(self.dimension_port);
23606        __tmp.put_u8(self.dimension_starboard);
23607        for val in &self.callsign {
23608            __tmp.put_u8(*val);
23609        }
23610        for val in &self.name {
23611            __tmp.put_u8(*val);
23612        }
23613        if matches!(version, MavlinkVersion::V2) {
23614            let len = __tmp.len();
23615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23616        } else {
23617            __tmp.len()
23618        }
23619    }
23620}
23621#[doc = "id: 69"]
23622#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
23623#[derive(Debug, Clone, PartialEq)]
23624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23626pub struct MANUAL_CONTROL_DATA {
23627    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
23628    pub x: i16,
23629    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
23630    pub y: i16,
23631    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
23632    pub z: i16,
23633    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
23634    pub r: i16,
23635    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
23636    pub buttons: u16,
23637    #[doc = "The system to be controlled."]
23638    pub target: u8,
23639    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
23640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23641    pub buttons2: u16,
23642    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
23643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23644    pub enabled_extensions: u8,
23645    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
23646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23647    pub s: i16,
23648    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
23649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23650    pub t: i16,
23651    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
23652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23653    pub aux1: i16,
23654    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
23655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23656    pub aux2: i16,
23657    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
23658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23659    pub aux3: i16,
23660    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
23661    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23662    pub aux4: i16,
23663    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
23664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23665    pub aux5: i16,
23666    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
23667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23668    pub aux6: i16,
23669}
23670impl MANUAL_CONTROL_DATA {
23671    pub const ENCODED_LEN: usize = 30usize;
23672    pub const DEFAULT: Self = Self {
23673        x: 0_i16,
23674        y: 0_i16,
23675        z: 0_i16,
23676        r: 0_i16,
23677        buttons: 0_u16,
23678        target: 0_u8,
23679        buttons2: 0_u16,
23680        enabled_extensions: 0_u8,
23681        s: 0_i16,
23682        t: 0_i16,
23683        aux1: 0_i16,
23684        aux2: 0_i16,
23685        aux3: 0_i16,
23686        aux4: 0_i16,
23687        aux5: 0_i16,
23688        aux6: 0_i16,
23689    };
23690    #[cfg(feature = "arbitrary")]
23691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23692        use arbitrary::{Arbitrary, Unstructured};
23693        let mut buf = [0u8; 1024];
23694        rng.fill_bytes(&mut buf);
23695        let mut unstructured = Unstructured::new(&buf);
23696        Self::arbitrary(&mut unstructured).unwrap_or_default()
23697    }
23698}
23699impl Default for MANUAL_CONTROL_DATA {
23700    fn default() -> Self {
23701        Self::DEFAULT.clone()
23702    }
23703}
23704impl MessageData for MANUAL_CONTROL_DATA {
23705    type Message = MavMessage;
23706    const ID: u32 = 69u32;
23707    const NAME: &'static str = "MANUAL_CONTROL";
23708    const EXTRA_CRC: u8 = 243u8;
23709    const ENCODED_LEN: usize = 30usize;
23710    fn deser(
23711        _version: MavlinkVersion,
23712        __input: &[u8],
23713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23714        let avail_len = __input.len();
23715        let mut payload_buf = [0; Self::ENCODED_LEN];
23716        let mut buf = if avail_len < Self::ENCODED_LEN {
23717            payload_buf[0..avail_len].copy_from_slice(__input);
23718            Bytes::new(&payload_buf)
23719        } else {
23720            Bytes::new(__input)
23721        };
23722        let mut __struct = Self::default();
23723        __struct.x = buf.get_i16_le();
23724        __struct.y = buf.get_i16_le();
23725        __struct.z = buf.get_i16_le();
23726        __struct.r = buf.get_i16_le();
23727        __struct.buttons = buf.get_u16_le();
23728        __struct.target = buf.get_u8();
23729        __struct.buttons2 = buf.get_u16_le();
23730        __struct.enabled_extensions = buf.get_u8();
23731        __struct.s = buf.get_i16_le();
23732        __struct.t = buf.get_i16_le();
23733        __struct.aux1 = buf.get_i16_le();
23734        __struct.aux2 = buf.get_i16_le();
23735        __struct.aux3 = buf.get_i16_le();
23736        __struct.aux4 = buf.get_i16_le();
23737        __struct.aux5 = buf.get_i16_le();
23738        __struct.aux6 = buf.get_i16_le();
23739        Ok(__struct)
23740    }
23741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23742        let mut __tmp = BytesMut::new(bytes);
23743        #[allow(clippy::absurd_extreme_comparisons)]
23744        #[allow(unused_comparisons)]
23745        if __tmp.remaining() < Self::ENCODED_LEN {
23746            panic!(
23747                "buffer is too small (need {} bytes, but got {})",
23748                Self::ENCODED_LEN,
23749                __tmp.remaining(),
23750            )
23751        }
23752        __tmp.put_i16_le(self.x);
23753        __tmp.put_i16_le(self.y);
23754        __tmp.put_i16_le(self.z);
23755        __tmp.put_i16_le(self.r);
23756        __tmp.put_u16_le(self.buttons);
23757        __tmp.put_u8(self.target);
23758        __tmp.put_u16_le(self.buttons2);
23759        __tmp.put_u8(self.enabled_extensions);
23760        __tmp.put_i16_le(self.s);
23761        __tmp.put_i16_le(self.t);
23762        __tmp.put_i16_le(self.aux1);
23763        __tmp.put_i16_le(self.aux2);
23764        __tmp.put_i16_le(self.aux3);
23765        __tmp.put_i16_le(self.aux4);
23766        __tmp.put_i16_le(self.aux5);
23767        __tmp.put_i16_le(self.aux6);
23768        if matches!(version, MavlinkVersion::V2) {
23769            let len = __tmp.len();
23770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23771        } else {
23772            __tmp.len()
23773        }
23774    }
23775}
23776#[doc = "id: 128"]
23777#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
23778#[derive(Debug, Clone, PartialEq)]
23779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23781pub struct GPS2_RTK_DATA {
23782    #[doc = "Time since boot of last baseline message received."]
23783    pub time_last_baseline_ms: u32,
23784    #[doc = "GPS Time of Week of last baseline"]
23785    pub tow: u32,
23786    #[doc = "Current baseline in ECEF x or NED north component."]
23787    pub baseline_a_mm: i32,
23788    #[doc = "Current baseline in ECEF y or NED east component."]
23789    pub baseline_b_mm: i32,
23790    #[doc = "Current baseline in ECEF z or NED down component."]
23791    pub baseline_c_mm: i32,
23792    #[doc = "Current estimate of baseline accuracy."]
23793    pub accuracy: u32,
23794    #[doc = "Current number of integer ambiguity hypotheses."]
23795    pub iar_num_hypotheses: i32,
23796    #[doc = "GPS Week Number of last baseline"]
23797    pub wn: u16,
23798    #[doc = "Identification of connected RTK receiver."]
23799    pub rtk_receiver_id: u8,
23800    #[doc = "GPS-specific health report for RTK data."]
23801    pub rtk_health: u8,
23802    #[doc = "Rate of baseline messages being received by GPS"]
23803    pub rtk_rate: u8,
23804    #[doc = "Current number of sats used for RTK calculation."]
23805    pub nsats: u8,
23806    #[doc = "Coordinate system of baseline"]
23807    pub baseline_coords_type: RtkBaselineCoordinateSystem,
23808}
23809impl GPS2_RTK_DATA {
23810    pub const ENCODED_LEN: usize = 35usize;
23811    pub const DEFAULT: Self = Self {
23812        time_last_baseline_ms: 0_u32,
23813        tow: 0_u32,
23814        baseline_a_mm: 0_i32,
23815        baseline_b_mm: 0_i32,
23816        baseline_c_mm: 0_i32,
23817        accuracy: 0_u32,
23818        iar_num_hypotheses: 0_i32,
23819        wn: 0_u16,
23820        rtk_receiver_id: 0_u8,
23821        rtk_health: 0_u8,
23822        rtk_rate: 0_u8,
23823        nsats: 0_u8,
23824        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
23825    };
23826    #[cfg(feature = "arbitrary")]
23827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23828        use arbitrary::{Arbitrary, Unstructured};
23829        let mut buf = [0u8; 1024];
23830        rng.fill_bytes(&mut buf);
23831        let mut unstructured = Unstructured::new(&buf);
23832        Self::arbitrary(&mut unstructured).unwrap_or_default()
23833    }
23834}
23835impl Default for GPS2_RTK_DATA {
23836    fn default() -> Self {
23837        Self::DEFAULT.clone()
23838    }
23839}
23840impl MessageData for GPS2_RTK_DATA {
23841    type Message = MavMessage;
23842    const ID: u32 = 128u32;
23843    const NAME: &'static str = "GPS2_RTK";
23844    const EXTRA_CRC: u8 = 226u8;
23845    const ENCODED_LEN: usize = 35usize;
23846    fn deser(
23847        _version: MavlinkVersion,
23848        __input: &[u8],
23849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23850        let avail_len = __input.len();
23851        let mut payload_buf = [0; Self::ENCODED_LEN];
23852        let mut buf = if avail_len < Self::ENCODED_LEN {
23853            payload_buf[0..avail_len].copy_from_slice(__input);
23854            Bytes::new(&payload_buf)
23855        } else {
23856            Bytes::new(__input)
23857        };
23858        let mut __struct = Self::default();
23859        __struct.time_last_baseline_ms = buf.get_u32_le();
23860        __struct.tow = buf.get_u32_le();
23861        __struct.baseline_a_mm = buf.get_i32_le();
23862        __struct.baseline_b_mm = buf.get_i32_le();
23863        __struct.baseline_c_mm = buf.get_i32_le();
23864        __struct.accuracy = buf.get_u32_le();
23865        __struct.iar_num_hypotheses = buf.get_i32_le();
23866        __struct.wn = buf.get_u16_le();
23867        __struct.rtk_receiver_id = buf.get_u8();
23868        __struct.rtk_health = buf.get_u8();
23869        __struct.rtk_rate = buf.get_u8();
23870        __struct.nsats = buf.get_u8();
23871        let tmp = buf.get_u8();
23872        __struct.baseline_coords_type =
23873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23874                enum_type: "RtkBaselineCoordinateSystem",
23875                value: tmp as u32,
23876            })?;
23877        Ok(__struct)
23878    }
23879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23880        let mut __tmp = BytesMut::new(bytes);
23881        #[allow(clippy::absurd_extreme_comparisons)]
23882        #[allow(unused_comparisons)]
23883        if __tmp.remaining() < Self::ENCODED_LEN {
23884            panic!(
23885                "buffer is too small (need {} bytes, but got {})",
23886                Self::ENCODED_LEN,
23887                __tmp.remaining(),
23888            )
23889        }
23890        __tmp.put_u32_le(self.time_last_baseline_ms);
23891        __tmp.put_u32_le(self.tow);
23892        __tmp.put_i32_le(self.baseline_a_mm);
23893        __tmp.put_i32_le(self.baseline_b_mm);
23894        __tmp.put_i32_le(self.baseline_c_mm);
23895        __tmp.put_u32_le(self.accuracy);
23896        __tmp.put_i32_le(self.iar_num_hypotheses);
23897        __tmp.put_u16_le(self.wn);
23898        __tmp.put_u8(self.rtk_receiver_id);
23899        __tmp.put_u8(self.rtk_health);
23900        __tmp.put_u8(self.rtk_rate);
23901        __tmp.put_u8(self.nsats);
23902        __tmp.put_u8(self.baseline_coords_type as u8);
23903        if matches!(version, MavlinkVersion::V2) {
23904            let len = __tmp.len();
23905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23906        } else {
23907            __tmp.len()
23908        }
23909    }
23910}
23911#[doc = "id: 86"]
23912#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
23913#[derive(Debug, Clone, PartialEq)]
23914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23916pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
23917    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
23918    pub time_boot_ms: u32,
23919    #[doc = "Latitude in WGS84 frame"]
23920    pub lat_int: i32,
23921    #[doc = "Longitude in WGS84 frame"]
23922    pub lon_int: i32,
23923    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
23924    pub alt: f32,
23925    #[doc = "X velocity in NED frame"]
23926    pub vx: f32,
23927    #[doc = "Y velocity in NED frame"]
23928    pub vy: f32,
23929    #[doc = "Z velocity in NED frame"]
23930    pub vz: f32,
23931    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23932    pub afx: f32,
23933    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23934    pub afy: f32,
23935    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23936    pub afz: f32,
23937    #[doc = "yaw setpoint"]
23938    pub yaw: f32,
23939    #[doc = "yaw rate setpoint"]
23940    pub yaw_rate: f32,
23941    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23942    pub type_mask: PositionTargetTypemask,
23943    #[doc = "System ID"]
23944    pub target_system: u8,
23945    #[doc = "Component ID"]
23946    pub target_component: u8,
23947    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
23948    pub coordinate_frame: MavFrame,
23949}
23950impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
23951    pub const ENCODED_LEN: usize = 53usize;
23952    pub const DEFAULT: Self = Self {
23953        time_boot_ms: 0_u32,
23954        lat_int: 0_i32,
23955        lon_int: 0_i32,
23956        alt: 0.0_f32,
23957        vx: 0.0_f32,
23958        vy: 0.0_f32,
23959        vz: 0.0_f32,
23960        afx: 0.0_f32,
23961        afy: 0.0_f32,
23962        afz: 0.0_f32,
23963        yaw: 0.0_f32,
23964        yaw_rate: 0.0_f32,
23965        type_mask: PositionTargetTypemask::DEFAULT,
23966        target_system: 0_u8,
23967        target_component: 0_u8,
23968        coordinate_frame: MavFrame::DEFAULT,
23969    };
23970    #[cfg(feature = "arbitrary")]
23971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23972        use arbitrary::{Arbitrary, Unstructured};
23973        let mut buf = [0u8; 1024];
23974        rng.fill_bytes(&mut buf);
23975        let mut unstructured = Unstructured::new(&buf);
23976        Self::arbitrary(&mut unstructured).unwrap_or_default()
23977    }
23978}
23979impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
23980    fn default() -> Self {
23981        Self::DEFAULT.clone()
23982    }
23983}
23984impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
23985    type Message = MavMessage;
23986    const ID: u32 = 86u32;
23987    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
23988    const EXTRA_CRC: u8 = 5u8;
23989    const ENCODED_LEN: usize = 53usize;
23990    fn deser(
23991        _version: MavlinkVersion,
23992        __input: &[u8],
23993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23994        let avail_len = __input.len();
23995        let mut payload_buf = [0; Self::ENCODED_LEN];
23996        let mut buf = if avail_len < Self::ENCODED_LEN {
23997            payload_buf[0..avail_len].copy_from_slice(__input);
23998            Bytes::new(&payload_buf)
23999        } else {
24000            Bytes::new(__input)
24001        };
24002        let mut __struct = Self::default();
24003        __struct.time_boot_ms = buf.get_u32_le();
24004        __struct.lat_int = buf.get_i32_le();
24005        __struct.lon_int = buf.get_i32_le();
24006        __struct.alt = buf.get_f32_le();
24007        __struct.vx = buf.get_f32_le();
24008        __struct.vy = buf.get_f32_le();
24009        __struct.vz = buf.get_f32_le();
24010        __struct.afx = buf.get_f32_le();
24011        __struct.afy = buf.get_f32_le();
24012        __struct.afz = buf.get_f32_le();
24013        __struct.yaw = buf.get_f32_le();
24014        __struct.yaw_rate = buf.get_f32_le();
24015        let tmp = buf.get_u16_le();
24016        __struct.type_mask = PositionTargetTypemask::from_bits(
24017            tmp & PositionTargetTypemask::all().bits(),
24018        )
24019        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24020            flag_type: "PositionTargetTypemask",
24021            value: tmp as u32,
24022        })?;
24023        __struct.target_system = buf.get_u8();
24024        __struct.target_component = buf.get_u8();
24025        let tmp = buf.get_u8();
24026        __struct.coordinate_frame =
24027            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24028                enum_type: "MavFrame",
24029                value: tmp as u32,
24030            })?;
24031        Ok(__struct)
24032    }
24033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24034        let mut __tmp = BytesMut::new(bytes);
24035        #[allow(clippy::absurd_extreme_comparisons)]
24036        #[allow(unused_comparisons)]
24037        if __tmp.remaining() < Self::ENCODED_LEN {
24038            panic!(
24039                "buffer is too small (need {} bytes, but got {})",
24040                Self::ENCODED_LEN,
24041                __tmp.remaining(),
24042            )
24043        }
24044        __tmp.put_u32_le(self.time_boot_ms);
24045        __tmp.put_i32_le(self.lat_int);
24046        __tmp.put_i32_le(self.lon_int);
24047        __tmp.put_f32_le(self.alt);
24048        __tmp.put_f32_le(self.vx);
24049        __tmp.put_f32_le(self.vy);
24050        __tmp.put_f32_le(self.vz);
24051        __tmp.put_f32_le(self.afx);
24052        __tmp.put_f32_le(self.afy);
24053        __tmp.put_f32_le(self.afz);
24054        __tmp.put_f32_le(self.yaw);
24055        __tmp.put_f32_le(self.yaw_rate);
24056        __tmp.put_u16_le(self.type_mask.bits());
24057        __tmp.put_u8(self.target_system);
24058        __tmp.put_u8(self.target_component);
24059        __tmp.put_u8(self.coordinate_frame as u8);
24060        if matches!(version, MavlinkVersion::V2) {
24061            let len = __tmp.len();
24062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24063        } else {
24064            __tmp.len()
24065        }
24066    }
24067}
24068#[doc = "id: 12902"]
24069#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
24070#[derive(Debug, Clone, PartialEq)]
24071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24073pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
24074    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24075    pub timestamp: u32,
24076    #[doc = "System ID (0 for broadcast)."]
24077    pub target_system: u8,
24078    #[doc = "Component ID (0 for broadcast)."]
24079    pub target_component: u8,
24080    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24081    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24082    pub id_or_mac: [u8; 20],
24083    #[doc = "Indicates the type of authentication."]
24084    pub authentication_type: MavOdidAuthType,
24085    #[doc = "Allowed range is 0 - 15."]
24086    pub data_page: u8,
24087    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
24088    pub last_page_index: u8,
24089    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
24090    pub length: u8,
24091    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
24092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24093    pub authentication_data: [u8; 23],
24094}
24095impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
24096    pub const ENCODED_LEN: usize = 53usize;
24097    pub const DEFAULT: Self = Self {
24098        timestamp: 0_u32,
24099        target_system: 0_u8,
24100        target_component: 0_u8,
24101        id_or_mac: [0_u8; 20usize],
24102        authentication_type: MavOdidAuthType::DEFAULT,
24103        data_page: 0_u8,
24104        last_page_index: 0_u8,
24105        length: 0_u8,
24106        authentication_data: [0_u8; 23usize],
24107    };
24108    #[cfg(feature = "arbitrary")]
24109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24110        use arbitrary::{Arbitrary, Unstructured};
24111        let mut buf = [0u8; 1024];
24112        rng.fill_bytes(&mut buf);
24113        let mut unstructured = Unstructured::new(&buf);
24114        Self::arbitrary(&mut unstructured).unwrap_or_default()
24115    }
24116}
24117impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
24118    fn default() -> Self {
24119        Self::DEFAULT.clone()
24120    }
24121}
24122impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
24123    type Message = MavMessage;
24124    const ID: u32 = 12902u32;
24125    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
24126    const EXTRA_CRC: u8 = 140u8;
24127    const ENCODED_LEN: usize = 53usize;
24128    fn deser(
24129        _version: MavlinkVersion,
24130        __input: &[u8],
24131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24132        let avail_len = __input.len();
24133        let mut payload_buf = [0; Self::ENCODED_LEN];
24134        let mut buf = if avail_len < Self::ENCODED_LEN {
24135            payload_buf[0..avail_len].copy_from_slice(__input);
24136            Bytes::new(&payload_buf)
24137        } else {
24138            Bytes::new(__input)
24139        };
24140        let mut __struct = Self::default();
24141        __struct.timestamp = buf.get_u32_le();
24142        __struct.target_system = buf.get_u8();
24143        __struct.target_component = buf.get_u8();
24144        for v in &mut __struct.id_or_mac {
24145            let val = buf.get_u8();
24146            *v = val;
24147        }
24148        let tmp = buf.get_u8();
24149        __struct.authentication_type =
24150            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24151                enum_type: "MavOdidAuthType",
24152                value: tmp as u32,
24153            })?;
24154        __struct.data_page = buf.get_u8();
24155        __struct.last_page_index = buf.get_u8();
24156        __struct.length = buf.get_u8();
24157        for v in &mut __struct.authentication_data {
24158            let val = buf.get_u8();
24159            *v = val;
24160        }
24161        Ok(__struct)
24162    }
24163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24164        let mut __tmp = BytesMut::new(bytes);
24165        #[allow(clippy::absurd_extreme_comparisons)]
24166        #[allow(unused_comparisons)]
24167        if __tmp.remaining() < Self::ENCODED_LEN {
24168            panic!(
24169                "buffer is too small (need {} bytes, but got {})",
24170                Self::ENCODED_LEN,
24171                __tmp.remaining(),
24172            )
24173        }
24174        __tmp.put_u32_le(self.timestamp);
24175        __tmp.put_u8(self.target_system);
24176        __tmp.put_u8(self.target_component);
24177        for val in &self.id_or_mac {
24178            __tmp.put_u8(*val);
24179        }
24180        __tmp.put_u8(self.authentication_type as u8);
24181        __tmp.put_u8(self.data_page);
24182        __tmp.put_u8(self.last_page_index);
24183        __tmp.put_u8(self.length);
24184        for val in &self.authentication_data {
24185            __tmp.put_u8(*val);
24186        }
24187        if matches!(version, MavlinkVersion::V2) {
24188            let len = __tmp.len();
24189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24190        } else {
24191            __tmp.len()
24192        }
24193    }
24194}
24195#[doc = "id: 232"]
24196#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
24197#[derive(Debug, Clone, PartialEq)]
24198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24200pub struct GPS_INPUT_DATA {
24201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24202    pub time_usec: u64,
24203    #[doc = "GPS time (from start of GPS week)"]
24204    pub time_week_ms: u32,
24205    #[doc = "Latitude (WGS84)"]
24206    pub lat: i32,
24207    #[doc = "Longitude (WGS84)"]
24208    pub lon: i32,
24209    #[doc = "Altitude (MSL). Positive for up."]
24210    pub alt: f32,
24211    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
24212    pub hdop: f32,
24213    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
24214    pub vdop: f32,
24215    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
24216    pub vn: f32,
24217    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
24218    pub ve: f32,
24219    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
24220    pub vd: f32,
24221    #[doc = "GPS speed accuracy"]
24222    pub speed_accuracy: f32,
24223    #[doc = "GPS horizontal accuracy"]
24224    pub horiz_accuracy: f32,
24225    #[doc = "GPS vertical accuracy"]
24226    pub vert_accuracy: f32,
24227    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
24228    pub ignore_flags: GpsInputIgnoreFlags,
24229    #[doc = "GPS week number"]
24230    pub time_week: u16,
24231    #[doc = "ID of the GPS for multiple GPS inputs"]
24232    pub gps_id: u8,
24233    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
24234    pub fix_type: u8,
24235    #[doc = "Number of satellites visible."]
24236    pub satellites_visible: u8,
24237    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
24238    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24239    pub yaw: u16,
24240}
24241impl GPS_INPUT_DATA {
24242    pub const ENCODED_LEN: usize = 65usize;
24243    pub const DEFAULT: Self = Self {
24244        time_usec: 0_u64,
24245        time_week_ms: 0_u32,
24246        lat: 0_i32,
24247        lon: 0_i32,
24248        alt: 0.0_f32,
24249        hdop: 0.0_f32,
24250        vdop: 0.0_f32,
24251        vn: 0.0_f32,
24252        ve: 0.0_f32,
24253        vd: 0.0_f32,
24254        speed_accuracy: 0.0_f32,
24255        horiz_accuracy: 0.0_f32,
24256        vert_accuracy: 0.0_f32,
24257        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
24258        time_week: 0_u16,
24259        gps_id: 0_u8,
24260        fix_type: 0_u8,
24261        satellites_visible: 0_u8,
24262        yaw: 0_u16,
24263    };
24264    #[cfg(feature = "arbitrary")]
24265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24266        use arbitrary::{Arbitrary, Unstructured};
24267        let mut buf = [0u8; 1024];
24268        rng.fill_bytes(&mut buf);
24269        let mut unstructured = Unstructured::new(&buf);
24270        Self::arbitrary(&mut unstructured).unwrap_or_default()
24271    }
24272}
24273impl Default for GPS_INPUT_DATA {
24274    fn default() -> Self {
24275        Self::DEFAULT.clone()
24276    }
24277}
24278impl MessageData for GPS_INPUT_DATA {
24279    type Message = MavMessage;
24280    const ID: u32 = 232u32;
24281    const NAME: &'static str = "GPS_INPUT";
24282    const EXTRA_CRC: u8 = 151u8;
24283    const ENCODED_LEN: usize = 65usize;
24284    fn deser(
24285        _version: MavlinkVersion,
24286        __input: &[u8],
24287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24288        let avail_len = __input.len();
24289        let mut payload_buf = [0; Self::ENCODED_LEN];
24290        let mut buf = if avail_len < Self::ENCODED_LEN {
24291            payload_buf[0..avail_len].copy_from_slice(__input);
24292            Bytes::new(&payload_buf)
24293        } else {
24294            Bytes::new(__input)
24295        };
24296        let mut __struct = Self::default();
24297        __struct.time_usec = buf.get_u64_le();
24298        __struct.time_week_ms = buf.get_u32_le();
24299        __struct.lat = buf.get_i32_le();
24300        __struct.lon = buf.get_i32_le();
24301        __struct.alt = buf.get_f32_le();
24302        __struct.hdop = buf.get_f32_le();
24303        __struct.vdop = buf.get_f32_le();
24304        __struct.vn = buf.get_f32_le();
24305        __struct.ve = buf.get_f32_le();
24306        __struct.vd = buf.get_f32_le();
24307        __struct.speed_accuracy = buf.get_f32_le();
24308        __struct.horiz_accuracy = buf.get_f32_le();
24309        __struct.vert_accuracy = buf.get_f32_le();
24310        let tmp = buf.get_u16_le();
24311        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
24312            tmp & GpsInputIgnoreFlags::all().bits(),
24313        )
24314        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24315            flag_type: "GpsInputIgnoreFlags",
24316            value: tmp as u32,
24317        })?;
24318        __struct.time_week = buf.get_u16_le();
24319        __struct.gps_id = buf.get_u8();
24320        __struct.fix_type = buf.get_u8();
24321        __struct.satellites_visible = buf.get_u8();
24322        __struct.yaw = buf.get_u16_le();
24323        Ok(__struct)
24324    }
24325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24326        let mut __tmp = BytesMut::new(bytes);
24327        #[allow(clippy::absurd_extreme_comparisons)]
24328        #[allow(unused_comparisons)]
24329        if __tmp.remaining() < Self::ENCODED_LEN {
24330            panic!(
24331                "buffer is too small (need {} bytes, but got {})",
24332                Self::ENCODED_LEN,
24333                __tmp.remaining(),
24334            )
24335        }
24336        __tmp.put_u64_le(self.time_usec);
24337        __tmp.put_u32_le(self.time_week_ms);
24338        __tmp.put_i32_le(self.lat);
24339        __tmp.put_i32_le(self.lon);
24340        __tmp.put_f32_le(self.alt);
24341        __tmp.put_f32_le(self.hdop);
24342        __tmp.put_f32_le(self.vdop);
24343        __tmp.put_f32_le(self.vn);
24344        __tmp.put_f32_le(self.ve);
24345        __tmp.put_f32_le(self.vd);
24346        __tmp.put_f32_le(self.speed_accuracy);
24347        __tmp.put_f32_le(self.horiz_accuracy);
24348        __tmp.put_f32_le(self.vert_accuracy);
24349        __tmp.put_u16_le(self.ignore_flags.bits());
24350        __tmp.put_u16_le(self.time_week);
24351        __tmp.put_u8(self.gps_id);
24352        __tmp.put_u8(self.fix_type);
24353        __tmp.put_u8(self.satellites_visible);
24354        __tmp.put_u16_le(self.yaw);
24355        if matches!(version, MavlinkVersion::V2) {
24356            let len = __tmp.len();
24357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24358        } else {
24359            __tmp.len()
24360        }
24361    }
24362}
24363#[doc = "id: 89"]
24364#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
24365#[derive(Debug, Clone, PartialEq)]
24366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24368pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
24369    #[doc = "Timestamp (time since system boot)."]
24370    pub time_boot_ms: u32,
24371    #[doc = "X Position"]
24372    pub x: f32,
24373    #[doc = "Y Position"]
24374    pub y: f32,
24375    #[doc = "Z Position"]
24376    pub z: f32,
24377    #[doc = "Roll"]
24378    pub roll: f32,
24379    #[doc = "Pitch"]
24380    pub pitch: f32,
24381    #[doc = "Yaw"]
24382    pub yaw: f32,
24383}
24384impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
24385    pub const ENCODED_LEN: usize = 28usize;
24386    pub const DEFAULT: Self = Self {
24387        time_boot_ms: 0_u32,
24388        x: 0.0_f32,
24389        y: 0.0_f32,
24390        z: 0.0_f32,
24391        roll: 0.0_f32,
24392        pitch: 0.0_f32,
24393        yaw: 0.0_f32,
24394    };
24395    #[cfg(feature = "arbitrary")]
24396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24397        use arbitrary::{Arbitrary, Unstructured};
24398        let mut buf = [0u8; 1024];
24399        rng.fill_bytes(&mut buf);
24400        let mut unstructured = Unstructured::new(&buf);
24401        Self::arbitrary(&mut unstructured).unwrap_or_default()
24402    }
24403}
24404impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
24405    fn default() -> Self {
24406        Self::DEFAULT.clone()
24407    }
24408}
24409impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
24410    type Message = MavMessage;
24411    const ID: u32 = 89u32;
24412    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
24413    const EXTRA_CRC: u8 = 231u8;
24414    const ENCODED_LEN: usize = 28usize;
24415    fn deser(
24416        _version: MavlinkVersion,
24417        __input: &[u8],
24418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24419        let avail_len = __input.len();
24420        let mut payload_buf = [0; Self::ENCODED_LEN];
24421        let mut buf = if avail_len < Self::ENCODED_LEN {
24422            payload_buf[0..avail_len].copy_from_slice(__input);
24423            Bytes::new(&payload_buf)
24424        } else {
24425            Bytes::new(__input)
24426        };
24427        let mut __struct = Self::default();
24428        __struct.time_boot_ms = buf.get_u32_le();
24429        __struct.x = buf.get_f32_le();
24430        __struct.y = buf.get_f32_le();
24431        __struct.z = buf.get_f32_le();
24432        __struct.roll = buf.get_f32_le();
24433        __struct.pitch = buf.get_f32_le();
24434        __struct.yaw = buf.get_f32_le();
24435        Ok(__struct)
24436    }
24437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24438        let mut __tmp = BytesMut::new(bytes);
24439        #[allow(clippy::absurd_extreme_comparisons)]
24440        #[allow(unused_comparisons)]
24441        if __tmp.remaining() < Self::ENCODED_LEN {
24442            panic!(
24443                "buffer is too small (need {} bytes, but got {})",
24444                Self::ENCODED_LEN,
24445                __tmp.remaining(),
24446            )
24447        }
24448        __tmp.put_u32_le(self.time_boot_ms);
24449        __tmp.put_f32_le(self.x);
24450        __tmp.put_f32_le(self.y);
24451        __tmp.put_f32_le(self.z);
24452        __tmp.put_f32_le(self.roll);
24453        __tmp.put_f32_le(self.pitch);
24454        __tmp.put_f32_le(self.yaw);
24455        if matches!(version, MavlinkVersion::V2) {
24456            let len = __tmp.len();
24457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24458        } else {
24459            __tmp.len()
24460        }
24461    }
24462}
24463#[doc = "id: 107"]
24464#[doc = "The IMU readings in SI units in NED body frame."]
24465#[derive(Debug, Clone, PartialEq)]
24466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24468pub struct HIL_SENSOR_DATA {
24469    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24470    pub time_usec: u64,
24471    #[doc = "X acceleration"]
24472    pub xacc: f32,
24473    #[doc = "Y acceleration"]
24474    pub yacc: f32,
24475    #[doc = "Z acceleration"]
24476    pub zacc: f32,
24477    #[doc = "Angular speed around X axis in body frame"]
24478    pub xgyro: f32,
24479    #[doc = "Angular speed around Y axis in body frame"]
24480    pub ygyro: f32,
24481    #[doc = "Angular speed around Z axis in body frame"]
24482    pub zgyro: f32,
24483    #[doc = "X Magnetic field"]
24484    pub xmag: f32,
24485    #[doc = "Y Magnetic field"]
24486    pub ymag: f32,
24487    #[doc = "Z Magnetic field"]
24488    pub zmag: f32,
24489    #[doc = "Absolute pressure"]
24490    pub abs_pressure: f32,
24491    #[doc = "Differential pressure (airspeed)"]
24492    pub diff_pressure: f32,
24493    #[doc = "Altitude calculated from pressure"]
24494    pub pressure_alt: f32,
24495    #[doc = "Temperature"]
24496    pub temperature: f32,
24497    #[doc = "Bitmap for fields that have updated since last message"]
24498    pub fields_updated: HilSensorUpdatedFlags,
24499    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
24500    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24501    pub id: u8,
24502}
24503impl HIL_SENSOR_DATA {
24504    pub const ENCODED_LEN: usize = 65usize;
24505    pub const DEFAULT: Self = Self {
24506        time_usec: 0_u64,
24507        xacc: 0.0_f32,
24508        yacc: 0.0_f32,
24509        zacc: 0.0_f32,
24510        xgyro: 0.0_f32,
24511        ygyro: 0.0_f32,
24512        zgyro: 0.0_f32,
24513        xmag: 0.0_f32,
24514        ymag: 0.0_f32,
24515        zmag: 0.0_f32,
24516        abs_pressure: 0.0_f32,
24517        diff_pressure: 0.0_f32,
24518        pressure_alt: 0.0_f32,
24519        temperature: 0.0_f32,
24520        fields_updated: HilSensorUpdatedFlags::DEFAULT,
24521        id: 0_u8,
24522    };
24523    #[cfg(feature = "arbitrary")]
24524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24525        use arbitrary::{Arbitrary, Unstructured};
24526        let mut buf = [0u8; 1024];
24527        rng.fill_bytes(&mut buf);
24528        let mut unstructured = Unstructured::new(&buf);
24529        Self::arbitrary(&mut unstructured).unwrap_or_default()
24530    }
24531}
24532impl Default for HIL_SENSOR_DATA {
24533    fn default() -> Self {
24534        Self::DEFAULT.clone()
24535    }
24536}
24537impl MessageData for HIL_SENSOR_DATA {
24538    type Message = MavMessage;
24539    const ID: u32 = 107u32;
24540    const NAME: &'static str = "HIL_SENSOR";
24541    const EXTRA_CRC: u8 = 108u8;
24542    const ENCODED_LEN: usize = 65usize;
24543    fn deser(
24544        _version: MavlinkVersion,
24545        __input: &[u8],
24546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24547        let avail_len = __input.len();
24548        let mut payload_buf = [0; Self::ENCODED_LEN];
24549        let mut buf = if avail_len < Self::ENCODED_LEN {
24550            payload_buf[0..avail_len].copy_from_slice(__input);
24551            Bytes::new(&payload_buf)
24552        } else {
24553            Bytes::new(__input)
24554        };
24555        let mut __struct = Self::default();
24556        __struct.time_usec = buf.get_u64_le();
24557        __struct.xacc = buf.get_f32_le();
24558        __struct.yacc = buf.get_f32_le();
24559        __struct.zacc = buf.get_f32_le();
24560        __struct.xgyro = buf.get_f32_le();
24561        __struct.ygyro = buf.get_f32_le();
24562        __struct.zgyro = buf.get_f32_le();
24563        __struct.xmag = buf.get_f32_le();
24564        __struct.ymag = buf.get_f32_le();
24565        __struct.zmag = buf.get_f32_le();
24566        __struct.abs_pressure = buf.get_f32_le();
24567        __struct.diff_pressure = buf.get_f32_le();
24568        __struct.pressure_alt = buf.get_f32_le();
24569        __struct.temperature = buf.get_f32_le();
24570        let tmp = buf.get_u32_le();
24571        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
24572            tmp & HilSensorUpdatedFlags::all().bits(),
24573        )
24574        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24575            flag_type: "HilSensorUpdatedFlags",
24576            value: tmp as u32,
24577        })?;
24578        __struct.id = buf.get_u8();
24579        Ok(__struct)
24580    }
24581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24582        let mut __tmp = BytesMut::new(bytes);
24583        #[allow(clippy::absurd_extreme_comparisons)]
24584        #[allow(unused_comparisons)]
24585        if __tmp.remaining() < Self::ENCODED_LEN {
24586            panic!(
24587                "buffer is too small (need {} bytes, but got {})",
24588                Self::ENCODED_LEN,
24589                __tmp.remaining(),
24590            )
24591        }
24592        __tmp.put_u64_le(self.time_usec);
24593        __tmp.put_f32_le(self.xacc);
24594        __tmp.put_f32_le(self.yacc);
24595        __tmp.put_f32_le(self.zacc);
24596        __tmp.put_f32_le(self.xgyro);
24597        __tmp.put_f32_le(self.ygyro);
24598        __tmp.put_f32_le(self.zgyro);
24599        __tmp.put_f32_le(self.xmag);
24600        __tmp.put_f32_le(self.ymag);
24601        __tmp.put_f32_le(self.zmag);
24602        __tmp.put_f32_le(self.abs_pressure);
24603        __tmp.put_f32_le(self.diff_pressure);
24604        __tmp.put_f32_le(self.pressure_alt);
24605        __tmp.put_f32_le(self.temperature);
24606        __tmp.put_u32_le(self.fields_updated.bits());
24607        __tmp.put_u8(self.id);
24608        if matches!(version, MavlinkVersion::V2) {
24609            let len = __tmp.len();
24610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24611        } else {
24612            __tmp.len()
24613        }
24614    }
24615}
24616#[doc = "id: 115"]
24617#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
24618#[derive(Debug, Clone, PartialEq)]
24619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24621pub struct HIL_STATE_QUATERNION_DATA {
24622    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24623    pub time_usec: u64,
24624    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
24625    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24626    pub attitude_quaternion: [f32; 4],
24627    #[doc = "Body frame roll / phi angular speed"]
24628    pub rollspeed: f32,
24629    #[doc = "Body frame pitch / theta angular speed"]
24630    pub pitchspeed: f32,
24631    #[doc = "Body frame yaw / psi angular speed"]
24632    pub yawspeed: f32,
24633    #[doc = "Latitude"]
24634    pub lat: i32,
24635    #[doc = "Longitude"]
24636    pub lon: i32,
24637    #[doc = "Altitude"]
24638    pub alt: i32,
24639    #[doc = "Ground X Speed (Latitude)"]
24640    pub vx: i16,
24641    #[doc = "Ground Y Speed (Longitude)"]
24642    pub vy: i16,
24643    #[doc = "Ground Z Speed (Altitude)"]
24644    pub vz: i16,
24645    #[doc = "Indicated airspeed"]
24646    pub ind_airspeed: u16,
24647    #[doc = "True airspeed"]
24648    pub true_airspeed: u16,
24649    #[doc = "X acceleration"]
24650    pub xacc: i16,
24651    #[doc = "Y acceleration"]
24652    pub yacc: i16,
24653    #[doc = "Z acceleration"]
24654    pub zacc: i16,
24655}
24656impl HIL_STATE_QUATERNION_DATA {
24657    pub const ENCODED_LEN: usize = 64usize;
24658    pub const DEFAULT: Self = Self {
24659        time_usec: 0_u64,
24660        attitude_quaternion: [0.0_f32; 4usize],
24661        rollspeed: 0.0_f32,
24662        pitchspeed: 0.0_f32,
24663        yawspeed: 0.0_f32,
24664        lat: 0_i32,
24665        lon: 0_i32,
24666        alt: 0_i32,
24667        vx: 0_i16,
24668        vy: 0_i16,
24669        vz: 0_i16,
24670        ind_airspeed: 0_u16,
24671        true_airspeed: 0_u16,
24672        xacc: 0_i16,
24673        yacc: 0_i16,
24674        zacc: 0_i16,
24675    };
24676    #[cfg(feature = "arbitrary")]
24677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24678        use arbitrary::{Arbitrary, Unstructured};
24679        let mut buf = [0u8; 1024];
24680        rng.fill_bytes(&mut buf);
24681        let mut unstructured = Unstructured::new(&buf);
24682        Self::arbitrary(&mut unstructured).unwrap_or_default()
24683    }
24684}
24685impl Default for HIL_STATE_QUATERNION_DATA {
24686    fn default() -> Self {
24687        Self::DEFAULT.clone()
24688    }
24689}
24690impl MessageData for HIL_STATE_QUATERNION_DATA {
24691    type Message = MavMessage;
24692    const ID: u32 = 115u32;
24693    const NAME: &'static str = "HIL_STATE_QUATERNION";
24694    const EXTRA_CRC: u8 = 4u8;
24695    const ENCODED_LEN: usize = 64usize;
24696    fn deser(
24697        _version: MavlinkVersion,
24698        __input: &[u8],
24699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24700        let avail_len = __input.len();
24701        let mut payload_buf = [0; Self::ENCODED_LEN];
24702        let mut buf = if avail_len < Self::ENCODED_LEN {
24703            payload_buf[0..avail_len].copy_from_slice(__input);
24704            Bytes::new(&payload_buf)
24705        } else {
24706            Bytes::new(__input)
24707        };
24708        let mut __struct = Self::default();
24709        __struct.time_usec = buf.get_u64_le();
24710        for v in &mut __struct.attitude_quaternion {
24711            let val = buf.get_f32_le();
24712            *v = val;
24713        }
24714        __struct.rollspeed = buf.get_f32_le();
24715        __struct.pitchspeed = buf.get_f32_le();
24716        __struct.yawspeed = buf.get_f32_le();
24717        __struct.lat = buf.get_i32_le();
24718        __struct.lon = buf.get_i32_le();
24719        __struct.alt = buf.get_i32_le();
24720        __struct.vx = buf.get_i16_le();
24721        __struct.vy = buf.get_i16_le();
24722        __struct.vz = buf.get_i16_le();
24723        __struct.ind_airspeed = buf.get_u16_le();
24724        __struct.true_airspeed = buf.get_u16_le();
24725        __struct.xacc = buf.get_i16_le();
24726        __struct.yacc = buf.get_i16_le();
24727        __struct.zacc = buf.get_i16_le();
24728        Ok(__struct)
24729    }
24730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24731        let mut __tmp = BytesMut::new(bytes);
24732        #[allow(clippy::absurd_extreme_comparisons)]
24733        #[allow(unused_comparisons)]
24734        if __tmp.remaining() < Self::ENCODED_LEN {
24735            panic!(
24736                "buffer is too small (need {} bytes, but got {})",
24737                Self::ENCODED_LEN,
24738                __tmp.remaining(),
24739            )
24740        }
24741        __tmp.put_u64_le(self.time_usec);
24742        for val in &self.attitude_quaternion {
24743            __tmp.put_f32_le(*val);
24744        }
24745        __tmp.put_f32_le(self.rollspeed);
24746        __tmp.put_f32_le(self.pitchspeed);
24747        __tmp.put_f32_le(self.yawspeed);
24748        __tmp.put_i32_le(self.lat);
24749        __tmp.put_i32_le(self.lon);
24750        __tmp.put_i32_le(self.alt);
24751        __tmp.put_i16_le(self.vx);
24752        __tmp.put_i16_le(self.vy);
24753        __tmp.put_i16_le(self.vz);
24754        __tmp.put_u16_le(self.ind_airspeed);
24755        __tmp.put_u16_le(self.true_airspeed);
24756        __tmp.put_i16_le(self.xacc);
24757        __tmp.put_i16_le(self.yacc);
24758        __tmp.put_i16_le(self.zacc);
24759        if matches!(version, MavlinkVersion::V2) {
24760            let len = __tmp.len();
24761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24762        } else {
24763            __tmp.len()
24764        }
24765    }
24766}
24767#[doc = "id: 119"]
24768#[doc = "Request a chunk of a log."]
24769#[derive(Debug, Clone, PartialEq)]
24770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24772pub struct LOG_REQUEST_DATA_DATA {
24773    #[doc = "Offset into the log"]
24774    pub ofs: u32,
24775    #[doc = "Number of bytes"]
24776    pub count: u32,
24777    #[doc = "Log id (from LOG_ENTRY reply)"]
24778    pub id: u16,
24779    #[doc = "System ID"]
24780    pub target_system: u8,
24781    #[doc = "Component ID"]
24782    pub target_component: u8,
24783}
24784impl LOG_REQUEST_DATA_DATA {
24785    pub const ENCODED_LEN: usize = 12usize;
24786    pub const DEFAULT: Self = Self {
24787        ofs: 0_u32,
24788        count: 0_u32,
24789        id: 0_u16,
24790        target_system: 0_u8,
24791        target_component: 0_u8,
24792    };
24793    #[cfg(feature = "arbitrary")]
24794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24795        use arbitrary::{Arbitrary, Unstructured};
24796        let mut buf = [0u8; 1024];
24797        rng.fill_bytes(&mut buf);
24798        let mut unstructured = Unstructured::new(&buf);
24799        Self::arbitrary(&mut unstructured).unwrap_or_default()
24800    }
24801}
24802impl Default for LOG_REQUEST_DATA_DATA {
24803    fn default() -> Self {
24804        Self::DEFAULT.clone()
24805    }
24806}
24807impl MessageData for LOG_REQUEST_DATA_DATA {
24808    type Message = MavMessage;
24809    const ID: u32 = 119u32;
24810    const NAME: &'static str = "LOG_REQUEST_DATA";
24811    const EXTRA_CRC: u8 = 116u8;
24812    const ENCODED_LEN: usize = 12usize;
24813    fn deser(
24814        _version: MavlinkVersion,
24815        __input: &[u8],
24816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24817        let avail_len = __input.len();
24818        let mut payload_buf = [0; Self::ENCODED_LEN];
24819        let mut buf = if avail_len < Self::ENCODED_LEN {
24820            payload_buf[0..avail_len].copy_from_slice(__input);
24821            Bytes::new(&payload_buf)
24822        } else {
24823            Bytes::new(__input)
24824        };
24825        let mut __struct = Self::default();
24826        __struct.ofs = buf.get_u32_le();
24827        __struct.count = buf.get_u32_le();
24828        __struct.id = buf.get_u16_le();
24829        __struct.target_system = buf.get_u8();
24830        __struct.target_component = buf.get_u8();
24831        Ok(__struct)
24832    }
24833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24834        let mut __tmp = BytesMut::new(bytes);
24835        #[allow(clippy::absurd_extreme_comparisons)]
24836        #[allow(unused_comparisons)]
24837        if __tmp.remaining() < Self::ENCODED_LEN {
24838            panic!(
24839                "buffer is too small (need {} bytes, but got {})",
24840                Self::ENCODED_LEN,
24841                __tmp.remaining(),
24842            )
24843        }
24844        __tmp.put_u32_le(self.ofs);
24845        __tmp.put_u32_le(self.count);
24846        __tmp.put_u16_le(self.id);
24847        __tmp.put_u8(self.target_system);
24848        __tmp.put_u8(self.target_component);
24849        if matches!(version, MavlinkVersion::V2) {
24850            let len = __tmp.len();
24851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24852        } else {
24853            __tmp.len()
24854        }
24855    }
24856}
24857#[doc = "id: 38"]
24858#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
24859#[derive(Debug, Clone, PartialEq)]
24860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24862pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
24863    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
24864    pub start_index: i16,
24865    #[doc = "End index, equal or greater than start index."]
24866    pub end_index: i16,
24867    #[doc = "System ID"]
24868    pub target_system: u8,
24869    #[doc = "Component ID"]
24870    pub target_component: u8,
24871    #[doc = "Mission type."]
24872    #[cfg_attr(feature = "serde", serde(default))]
24873    pub mission_type: MavMissionType,
24874}
24875impl MISSION_WRITE_PARTIAL_LIST_DATA {
24876    pub const ENCODED_LEN: usize = 7usize;
24877    pub const DEFAULT: Self = Self {
24878        start_index: 0_i16,
24879        end_index: 0_i16,
24880        target_system: 0_u8,
24881        target_component: 0_u8,
24882        mission_type: MavMissionType::DEFAULT,
24883    };
24884    #[cfg(feature = "arbitrary")]
24885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24886        use arbitrary::{Arbitrary, Unstructured};
24887        let mut buf = [0u8; 1024];
24888        rng.fill_bytes(&mut buf);
24889        let mut unstructured = Unstructured::new(&buf);
24890        Self::arbitrary(&mut unstructured).unwrap_or_default()
24891    }
24892}
24893impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
24894    fn default() -> Self {
24895        Self::DEFAULT.clone()
24896    }
24897}
24898impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
24899    type Message = MavMessage;
24900    const ID: u32 = 38u32;
24901    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
24902    const EXTRA_CRC: u8 = 9u8;
24903    const ENCODED_LEN: usize = 7usize;
24904    fn deser(
24905        _version: MavlinkVersion,
24906        __input: &[u8],
24907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24908        let avail_len = __input.len();
24909        let mut payload_buf = [0; Self::ENCODED_LEN];
24910        let mut buf = if avail_len < Self::ENCODED_LEN {
24911            payload_buf[0..avail_len].copy_from_slice(__input);
24912            Bytes::new(&payload_buf)
24913        } else {
24914            Bytes::new(__input)
24915        };
24916        let mut __struct = Self::default();
24917        __struct.start_index = buf.get_i16_le();
24918        __struct.end_index = buf.get_i16_le();
24919        __struct.target_system = buf.get_u8();
24920        __struct.target_component = buf.get_u8();
24921        let tmp = buf.get_u8();
24922        __struct.mission_type =
24923            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24924                enum_type: "MavMissionType",
24925                value: tmp as u32,
24926            })?;
24927        Ok(__struct)
24928    }
24929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24930        let mut __tmp = BytesMut::new(bytes);
24931        #[allow(clippy::absurd_extreme_comparisons)]
24932        #[allow(unused_comparisons)]
24933        if __tmp.remaining() < Self::ENCODED_LEN {
24934            panic!(
24935                "buffer is too small (need {} bytes, but got {})",
24936                Self::ENCODED_LEN,
24937                __tmp.remaining(),
24938            )
24939        }
24940        __tmp.put_i16_le(self.start_index);
24941        __tmp.put_i16_le(self.end_index);
24942        __tmp.put_u8(self.target_system);
24943        __tmp.put_u8(self.target_component);
24944        __tmp.put_u8(self.mission_type as u8);
24945        if matches!(version, MavlinkVersion::V2) {
24946            let len = __tmp.len();
24947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24948        } else {
24949            __tmp.len()
24950        }
24951    }
24952}
24953#[doc = "id: 106"]
24954#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
24955#[derive(Debug, Clone, PartialEq)]
24956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24958pub struct OPTICAL_FLOW_RAD_DATA {
24959    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24960    pub time_usec: u64,
24961    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
24962    pub integration_time_us: u32,
24963    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
24964    pub integrated_x: f32,
24965    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
24966    pub integrated_y: f32,
24967    #[doc = "RH rotation around X axis"]
24968    pub integrated_xgyro: f32,
24969    #[doc = "RH rotation around Y axis"]
24970    pub integrated_ygyro: f32,
24971    #[doc = "RH rotation around Z axis"]
24972    pub integrated_zgyro: f32,
24973    #[doc = "Time since the distance was sampled."]
24974    pub time_delta_distance_us: u32,
24975    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
24976    pub distance: f32,
24977    #[doc = "Temperature"]
24978    pub temperature: i16,
24979    #[doc = "Sensor ID"]
24980    pub sensor_id: u8,
24981    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
24982    pub quality: u8,
24983}
24984impl OPTICAL_FLOW_RAD_DATA {
24985    pub const ENCODED_LEN: usize = 44usize;
24986    pub const DEFAULT: Self = Self {
24987        time_usec: 0_u64,
24988        integration_time_us: 0_u32,
24989        integrated_x: 0.0_f32,
24990        integrated_y: 0.0_f32,
24991        integrated_xgyro: 0.0_f32,
24992        integrated_ygyro: 0.0_f32,
24993        integrated_zgyro: 0.0_f32,
24994        time_delta_distance_us: 0_u32,
24995        distance: 0.0_f32,
24996        temperature: 0_i16,
24997        sensor_id: 0_u8,
24998        quality: 0_u8,
24999    };
25000    #[cfg(feature = "arbitrary")]
25001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25002        use arbitrary::{Arbitrary, Unstructured};
25003        let mut buf = [0u8; 1024];
25004        rng.fill_bytes(&mut buf);
25005        let mut unstructured = Unstructured::new(&buf);
25006        Self::arbitrary(&mut unstructured).unwrap_or_default()
25007    }
25008}
25009impl Default for OPTICAL_FLOW_RAD_DATA {
25010    fn default() -> Self {
25011        Self::DEFAULT.clone()
25012    }
25013}
25014impl MessageData for OPTICAL_FLOW_RAD_DATA {
25015    type Message = MavMessage;
25016    const ID: u32 = 106u32;
25017    const NAME: &'static str = "OPTICAL_FLOW_RAD";
25018    const EXTRA_CRC: u8 = 138u8;
25019    const ENCODED_LEN: usize = 44usize;
25020    fn deser(
25021        _version: MavlinkVersion,
25022        __input: &[u8],
25023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25024        let avail_len = __input.len();
25025        let mut payload_buf = [0; Self::ENCODED_LEN];
25026        let mut buf = if avail_len < Self::ENCODED_LEN {
25027            payload_buf[0..avail_len].copy_from_slice(__input);
25028            Bytes::new(&payload_buf)
25029        } else {
25030            Bytes::new(__input)
25031        };
25032        let mut __struct = Self::default();
25033        __struct.time_usec = buf.get_u64_le();
25034        __struct.integration_time_us = buf.get_u32_le();
25035        __struct.integrated_x = buf.get_f32_le();
25036        __struct.integrated_y = buf.get_f32_le();
25037        __struct.integrated_xgyro = buf.get_f32_le();
25038        __struct.integrated_ygyro = buf.get_f32_le();
25039        __struct.integrated_zgyro = buf.get_f32_le();
25040        __struct.time_delta_distance_us = buf.get_u32_le();
25041        __struct.distance = buf.get_f32_le();
25042        __struct.temperature = buf.get_i16_le();
25043        __struct.sensor_id = buf.get_u8();
25044        __struct.quality = buf.get_u8();
25045        Ok(__struct)
25046    }
25047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25048        let mut __tmp = BytesMut::new(bytes);
25049        #[allow(clippy::absurd_extreme_comparisons)]
25050        #[allow(unused_comparisons)]
25051        if __tmp.remaining() < Self::ENCODED_LEN {
25052            panic!(
25053                "buffer is too small (need {} bytes, but got {})",
25054                Self::ENCODED_LEN,
25055                __tmp.remaining(),
25056            )
25057        }
25058        __tmp.put_u64_le(self.time_usec);
25059        __tmp.put_u32_le(self.integration_time_us);
25060        __tmp.put_f32_le(self.integrated_x);
25061        __tmp.put_f32_le(self.integrated_y);
25062        __tmp.put_f32_le(self.integrated_xgyro);
25063        __tmp.put_f32_le(self.integrated_ygyro);
25064        __tmp.put_f32_le(self.integrated_zgyro);
25065        __tmp.put_u32_le(self.time_delta_distance_us);
25066        __tmp.put_f32_le(self.distance);
25067        __tmp.put_i16_le(self.temperature);
25068        __tmp.put_u8(self.sensor_id);
25069        __tmp.put_u8(self.quality);
25070        if matches!(version, MavlinkVersion::V2) {
25071            let len = __tmp.len();
25072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25073        } else {
25074            __tmp.len()
25075        }
25076    }
25077}
25078#[doc = "id: 125"]
25079#[doc = "Power supply status."]
25080#[derive(Debug, Clone, PartialEq)]
25081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25083pub struct POWER_STATUS_DATA {
25084    #[doc = "5V rail voltage."]
25085    pub Vcc: u16,
25086    #[doc = "Servo rail voltage."]
25087    pub Vservo: u16,
25088    #[doc = "Bitmap of power supply status flags."]
25089    pub flags: MavPowerStatus,
25090}
25091impl POWER_STATUS_DATA {
25092    pub const ENCODED_LEN: usize = 6usize;
25093    pub const DEFAULT: Self = Self {
25094        Vcc: 0_u16,
25095        Vservo: 0_u16,
25096        flags: MavPowerStatus::DEFAULT,
25097    };
25098    #[cfg(feature = "arbitrary")]
25099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25100        use arbitrary::{Arbitrary, Unstructured};
25101        let mut buf = [0u8; 1024];
25102        rng.fill_bytes(&mut buf);
25103        let mut unstructured = Unstructured::new(&buf);
25104        Self::arbitrary(&mut unstructured).unwrap_or_default()
25105    }
25106}
25107impl Default for POWER_STATUS_DATA {
25108    fn default() -> Self {
25109        Self::DEFAULT.clone()
25110    }
25111}
25112impl MessageData for POWER_STATUS_DATA {
25113    type Message = MavMessage;
25114    const ID: u32 = 125u32;
25115    const NAME: &'static str = "POWER_STATUS";
25116    const EXTRA_CRC: u8 = 203u8;
25117    const ENCODED_LEN: usize = 6usize;
25118    fn deser(
25119        _version: MavlinkVersion,
25120        __input: &[u8],
25121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25122        let avail_len = __input.len();
25123        let mut payload_buf = [0; Self::ENCODED_LEN];
25124        let mut buf = if avail_len < Self::ENCODED_LEN {
25125            payload_buf[0..avail_len].copy_from_slice(__input);
25126            Bytes::new(&payload_buf)
25127        } else {
25128            Bytes::new(__input)
25129        };
25130        let mut __struct = Self::default();
25131        __struct.Vcc = buf.get_u16_le();
25132        __struct.Vservo = buf.get_u16_le();
25133        let tmp = buf.get_u16_le();
25134        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25135            ::mavlink_core::error::ParserError::InvalidFlag {
25136                flag_type: "MavPowerStatus",
25137                value: tmp as u32,
25138            },
25139        )?;
25140        Ok(__struct)
25141    }
25142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25143        let mut __tmp = BytesMut::new(bytes);
25144        #[allow(clippy::absurd_extreme_comparisons)]
25145        #[allow(unused_comparisons)]
25146        if __tmp.remaining() < Self::ENCODED_LEN {
25147            panic!(
25148                "buffer is too small (need {} bytes, but got {})",
25149                Self::ENCODED_LEN,
25150                __tmp.remaining(),
25151            )
25152        }
25153        __tmp.put_u16_le(self.Vcc);
25154        __tmp.put_u16_le(self.Vservo);
25155        __tmp.put_u16_le(self.flags.bits());
25156        if matches!(version, MavlinkVersion::V2) {
25157            let len = __tmp.len();
25158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25159        } else {
25160            __tmp.len()
25161        }
25162    }
25163}
25164#[doc = "id: 80"]
25165#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
25166#[derive(Debug, Clone, PartialEq)]
25167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25169pub struct COMMAND_CANCEL_DATA {
25170    #[doc = "Command ID (of command to cancel)."]
25171    pub command: MavCmd,
25172    #[doc = "System executing long running command. Should not be broadcast (0)."]
25173    pub target_system: u8,
25174    #[doc = "Component executing long running command."]
25175    pub target_component: u8,
25176}
25177impl COMMAND_CANCEL_DATA {
25178    pub const ENCODED_LEN: usize = 4usize;
25179    pub const DEFAULT: Self = Self {
25180        command: MavCmd::DEFAULT,
25181        target_system: 0_u8,
25182        target_component: 0_u8,
25183    };
25184    #[cfg(feature = "arbitrary")]
25185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25186        use arbitrary::{Arbitrary, Unstructured};
25187        let mut buf = [0u8; 1024];
25188        rng.fill_bytes(&mut buf);
25189        let mut unstructured = Unstructured::new(&buf);
25190        Self::arbitrary(&mut unstructured).unwrap_or_default()
25191    }
25192}
25193impl Default for COMMAND_CANCEL_DATA {
25194    fn default() -> Self {
25195        Self::DEFAULT.clone()
25196    }
25197}
25198impl MessageData for COMMAND_CANCEL_DATA {
25199    type Message = MavMessage;
25200    const ID: u32 = 80u32;
25201    const NAME: &'static str = "COMMAND_CANCEL";
25202    const EXTRA_CRC: u8 = 14u8;
25203    const ENCODED_LEN: usize = 4usize;
25204    fn deser(
25205        _version: MavlinkVersion,
25206        __input: &[u8],
25207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25208        let avail_len = __input.len();
25209        let mut payload_buf = [0; Self::ENCODED_LEN];
25210        let mut buf = if avail_len < Self::ENCODED_LEN {
25211            payload_buf[0..avail_len].copy_from_slice(__input);
25212            Bytes::new(&payload_buf)
25213        } else {
25214            Bytes::new(__input)
25215        };
25216        let mut __struct = Self::default();
25217        let tmp = buf.get_u16_le();
25218        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
25219            ::mavlink_core::error::ParserError::InvalidEnum {
25220                enum_type: "MavCmd",
25221                value: tmp as u32,
25222            },
25223        )?;
25224        __struct.target_system = buf.get_u8();
25225        __struct.target_component = buf.get_u8();
25226        Ok(__struct)
25227    }
25228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25229        let mut __tmp = BytesMut::new(bytes);
25230        #[allow(clippy::absurd_extreme_comparisons)]
25231        #[allow(unused_comparisons)]
25232        if __tmp.remaining() < Self::ENCODED_LEN {
25233            panic!(
25234                "buffer is too small (need {} bytes, but got {})",
25235                Self::ENCODED_LEN,
25236                __tmp.remaining(),
25237            )
25238        }
25239        __tmp.put_u16_le(self.command as u16);
25240        __tmp.put_u8(self.target_system);
25241        __tmp.put_u8(self.target_component);
25242        if matches!(version, MavlinkVersion::V2) {
25243            let len = __tmp.len();
25244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25245        } else {
25246            __tmp.len()
25247        }
25248    }
25249}
25250#[doc = "id: 300"]
25251#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25252#[derive(Debug, Clone, PartialEq)]
25253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25255pub struct PROTOCOL_VERSION_DATA {
25256    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25257    pub version: u16,
25258    #[doc = "Minimum MAVLink version supported"]
25259    pub min_version: u16,
25260    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25261    pub max_version: u16,
25262    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25263    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25264    pub spec_version_hash: [u8; 8],
25265    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25267    pub library_version_hash: [u8; 8],
25268}
25269impl PROTOCOL_VERSION_DATA {
25270    pub const ENCODED_LEN: usize = 22usize;
25271    pub const DEFAULT: Self = Self {
25272        version: 0_u16,
25273        min_version: 0_u16,
25274        max_version: 0_u16,
25275        spec_version_hash: [0_u8; 8usize],
25276        library_version_hash: [0_u8; 8usize],
25277    };
25278    #[cfg(feature = "arbitrary")]
25279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25280        use arbitrary::{Arbitrary, Unstructured};
25281        let mut buf = [0u8; 1024];
25282        rng.fill_bytes(&mut buf);
25283        let mut unstructured = Unstructured::new(&buf);
25284        Self::arbitrary(&mut unstructured).unwrap_or_default()
25285    }
25286}
25287impl Default for PROTOCOL_VERSION_DATA {
25288    fn default() -> Self {
25289        Self::DEFAULT.clone()
25290    }
25291}
25292impl MessageData for PROTOCOL_VERSION_DATA {
25293    type Message = MavMessage;
25294    const ID: u32 = 300u32;
25295    const NAME: &'static str = "PROTOCOL_VERSION";
25296    const EXTRA_CRC: u8 = 217u8;
25297    const ENCODED_LEN: usize = 22usize;
25298    fn deser(
25299        _version: MavlinkVersion,
25300        __input: &[u8],
25301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25302        let avail_len = __input.len();
25303        let mut payload_buf = [0; Self::ENCODED_LEN];
25304        let mut buf = if avail_len < Self::ENCODED_LEN {
25305            payload_buf[0..avail_len].copy_from_slice(__input);
25306            Bytes::new(&payload_buf)
25307        } else {
25308            Bytes::new(__input)
25309        };
25310        let mut __struct = Self::default();
25311        __struct.version = buf.get_u16_le();
25312        __struct.min_version = buf.get_u16_le();
25313        __struct.max_version = buf.get_u16_le();
25314        for v in &mut __struct.spec_version_hash {
25315            let val = buf.get_u8();
25316            *v = val;
25317        }
25318        for v in &mut __struct.library_version_hash {
25319            let val = buf.get_u8();
25320            *v = val;
25321        }
25322        Ok(__struct)
25323    }
25324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25325        let mut __tmp = BytesMut::new(bytes);
25326        #[allow(clippy::absurd_extreme_comparisons)]
25327        #[allow(unused_comparisons)]
25328        if __tmp.remaining() < Self::ENCODED_LEN {
25329            panic!(
25330                "buffer is too small (need {} bytes, but got {})",
25331                Self::ENCODED_LEN,
25332                __tmp.remaining(),
25333            )
25334        }
25335        __tmp.put_u16_le(self.version);
25336        __tmp.put_u16_le(self.min_version);
25337        __tmp.put_u16_le(self.max_version);
25338        for val in &self.spec_version_hash {
25339            __tmp.put_u8(*val);
25340        }
25341        for val in &self.library_version_hash {
25342            __tmp.put_u8(*val);
25343        }
25344        if matches!(version, MavlinkVersion::V2) {
25345            let len = __tmp.len();
25346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25347        } else {
25348            __tmp.len()
25349        }
25350    }
25351}
25352#[doc = "id: 411"]
25353#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
25354#[derive(Debug, Clone, PartialEq)]
25355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25357pub struct CURRENT_EVENT_SEQUENCE_DATA {
25358    #[doc = "Sequence number."]
25359    pub sequence: u16,
25360    #[doc = "Flag bitset."]
25361    pub flags: MavEventCurrentSequenceFlags,
25362}
25363impl CURRENT_EVENT_SEQUENCE_DATA {
25364    pub const ENCODED_LEN: usize = 3usize;
25365    pub const DEFAULT: Self = Self {
25366        sequence: 0_u16,
25367        flags: MavEventCurrentSequenceFlags::DEFAULT,
25368    };
25369    #[cfg(feature = "arbitrary")]
25370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25371        use arbitrary::{Arbitrary, Unstructured};
25372        let mut buf = [0u8; 1024];
25373        rng.fill_bytes(&mut buf);
25374        let mut unstructured = Unstructured::new(&buf);
25375        Self::arbitrary(&mut unstructured).unwrap_or_default()
25376    }
25377}
25378impl Default for CURRENT_EVENT_SEQUENCE_DATA {
25379    fn default() -> Self {
25380        Self::DEFAULT.clone()
25381    }
25382}
25383impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
25384    type Message = MavMessage;
25385    const ID: u32 = 411u32;
25386    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
25387    const EXTRA_CRC: u8 = 106u8;
25388    const ENCODED_LEN: usize = 3usize;
25389    fn deser(
25390        _version: MavlinkVersion,
25391        __input: &[u8],
25392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25393        let avail_len = __input.len();
25394        let mut payload_buf = [0; Self::ENCODED_LEN];
25395        let mut buf = if avail_len < Self::ENCODED_LEN {
25396            payload_buf[0..avail_len].copy_from_slice(__input);
25397            Bytes::new(&payload_buf)
25398        } else {
25399            Bytes::new(__input)
25400        };
25401        let mut __struct = Self::default();
25402        __struct.sequence = buf.get_u16_le();
25403        let tmp = buf.get_u8();
25404        __struct.flags =
25405            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25406                enum_type: "MavEventCurrentSequenceFlags",
25407                value: tmp as u32,
25408            })?;
25409        Ok(__struct)
25410    }
25411    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25412        let mut __tmp = BytesMut::new(bytes);
25413        #[allow(clippy::absurd_extreme_comparisons)]
25414        #[allow(unused_comparisons)]
25415        if __tmp.remaining() < Self::ENCODED_LEN {
25416            panic!(
25417                "buffer is too small (need {} bytes, but got {})",
25418                Self::ENCODED_LEN,
25419                __tmp.remaining(),
25420            )
25421        }
25422        __tmp.put_u16_le(self.sequence);
25423        __tmp.put_u8(self.flags as u8);
25424        if matches!(version, MavlinkVersion::V2) {
25425            let len = __tmp.len();
25426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25427        } else {
25428            __tmp.len()
25429        }
25430    }
25431}
25432#[doc = "id: 35"]
25433#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25434#[derive(Debug, Clone, PartialEq)]
25435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25437pub struct RC_CHANNELS_RAW_DATA {
25438    #[doc = "Timestamp (time since system boot)."]
25439    pub time_boot_ms: u32,
25440    #[doc = "RC channel 1 value."]
25441    pub chan1_raw: u16,
25442    #[doc = "RC channel 2 value."]
25443    pub chan2_raw: u16,
25444    #[doc = "RC channel 3 value."]
25445    pub chan3_raw: u16,
25446    #[doc = "RC channel 4 value."]
25447    pub chan4_raw: u16,
25448    #[doc = "RC channel 5 value."]
25449    pub chan5_raw: u16,
25450    #[doc = "RC channel 6 value."]
25451    pub chan6_raw: u16,
25452    #[doc = "RC channel 7 value."]
25453    pub chan7_raw: u16,
25454    #[doc = "RC channel 8 value."]
25455    pub chan8_raw: u16,
25456    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25457    pub port: u8,
25458    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25459    pub rssi: u8,
25460}
25461impl RC_CHANNELS_RAW_DATA {
25462    pub const ENCODED_LEN: usize = 22usize;
25463    pub const DEFAULT: Self = Self {
25464        time_boot_ms: 0_u32,
25465        chan1_raw: 0_u16,
25466        chan2_raw: 0_u16,
25467        chan3_raw: 0_u16,
25468        chan4_raw: 0_u16,
25469        chan5_raw: 0_u16,
25470        chan6_raw: 0_u16,
25471        chan7_raw: 0_u16,
25472        chan8_raw: 0_u16,
25473        port: 0_u8,
25474        rssi: 0_u8,
25475    };
25476    #[cfg(feature = "arbitrary")]
25477    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25478        use arbitrary::{Arbitrary, Unstructured};
25479        let mut buf = [0u8; 1024];
25480        rng.fill_bytes(&mut buf);
25481        let mut unstructured = Unstructured::new(&buf);
25482        Self::arbitrary(&mut unstructured).unwrap_or_default()
25483    }
25484}
25485impl Default for RC_CHANNELS_RAW_DATA {
25486    fn default() -> Self {
25487        Self::DEFAULT.clone()
25488    }
25489}
25490impl MessageData for RC_CHANNELS_RAW_DATA {
25491    type Message = MavMessage;
25492    const ID: u32 = 35u32;
25493    const NAME: &'static str = "RC_CHANNELS_RAW";
25494    const EXTRA_CRC: u8 = 244u8;
25495    const ENCODED_LEN: usize = 22usize;
25496    fn deser(
25497        _version: MavlinkVersion,
25498        __input: &[u8],
25499    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25500        let avail_len = __input.len();
25501        let mut payload_buf = [0; Self::ENCODED_LEN];
25502        let mut buf = if avail_len < Self::ENCODED_LEN {
25503            payload_buf[0..avail_len].copy_from_slice(__input);
25504            Bytes::new(&payload_buf)
25505        } else {
25506            Bytes::new(__input)
25507        };
25508        let mut __struct = Self::default();
25509        __struct.time_boot_ms = buf.get_u32_le();
25510        __struct.chan1_raw = buf.get_u16_le();
25511        __struct.chan2_raw = buf.get_u16_le();
25512        __struct.chan3_raw = buf.get_u16_le();
25513        __struct.chan4_raw = buf.get_u16_le();
25514        __struct.chan5_raw = buf.get_u16_le();
25515        __struct.chan6_raw = buf.get_u16_le();
25516        __struct.chan7_raw = buf.get_u16_le();
25517        __struct.chan8_raw = buf.get_u16_le();
25518        __struct.port = buf.get_u8();
25519        __struct.rssi = buf.get_u8();
25520        Ok(__struct)
25521    }
25522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25523        let mut __tmp = BytesMut::new(bytes);
25524        #[allow(clippy::absurd_extreme_comparisons)]
25525        #[allow(unused_comparisons)]
25526        if __tmp.remaining() < Self::ENCODED_LEN {
25527            panic!(
25528                "buffer is too small (need {} bytes, but got {})",
25529                Self::ENCODED_LEN,
25530                __tmp.remaining(),
25531            )
25532        }
25533        __tmp.put_u32_le(self.time_boot_ms);
25534        __tmp.put_u16_le(self.chan1_raw);
25535        __tmp.put_u16_le(self.chan2_raw);
25536        __tmp.put_u16_le(self.chan3_raw);
25537        __tmp.put_u16_le(self.chan4_raw);
25538        __tmp.put_u16_le(self.chan5_raw);
25539        __tmp.put_u16_le(self.chan6_raw);
25540        __tmp.put_u16_le(self.chan7_raw);
25541        __tmp.put_u16_le(self.chan8_raw);
25542        __tmp.put_u8(self.port);
25543        __tmp.put_u8(self.rssi);
25544        if matches!(version, MavlinkVersion::V2) {
25545            let len = __tmp.len();
25546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25547        } else {
25548            __tmp.len()
25549        }
25550    }
25551}
25552#[doc = "id: 8016"]
25553#[doc = "Calibrated airflow angle measurements."]
25554#[derive(Debug, Clone, PartialEq)]
25555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25557pub struct SENSOR_AIRFLOW_ANGLES_DATA {
25558    #[doc = "Timestamp"]
25559    pub timestamp: u64,
25560    #[doc = "Angle of attack"]
25561    pub angleofattack: f32,
25562    #[doc = "Sideslip angle"]
25563    pub sideslip: f32,
25564    #[doc = "Angle of attack measurement valid"]
25565    pub angleofattack_valid: u8,
25566    #[doc = "Sideslip angle measurement valid"]
25567    pub sideslip_valid: u8,
25568}
25569impl SENSOR_AIRFLOW_ANGLES_DATA {
25570    pub const ENCODED_LEN: usize = 18usize;
25571    pub const DEFAULT: Self = Self {
25572        timestamp: 0_u64,
25573        angleofattack: 0.0_f32,
25574        sideslip: 0.0_f32,
25575        angleofattack_valid: 0_u8,
25576        sideslip_valid: 0_u8,
25577    };
25578    #[cfg(feature = "arbitrary")]
25579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25580        use arbitrary::{Arbitrary, Unstructured};
25581        let mut buf = [0u8; 1024];
25582        rng.fill_bytes(&mut buf);
25583        let mut unstructured = Unstructured::new(&buf);
25584        Self::arbitrary(&mut unstructured).unwrap_or_default()
25585    }
25586}
25587impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
25588    fn default() -> Self {
25589        Self::DEFAULT.clone()
25590    }
25591}
25592impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
25593    type Message = MavMessage;
25594    const ID: u32 = 8016u32;
25595    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
25596    const EXTRA_CRC: u8 = 149u8;
25597    const ENCODED_LEN: usize = 18usize;
25598    fn deser(
25599        _version: MavlinkVersion,
25600        __input: &[u8],
25601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25602        let avail_len = __input.len();
25603        let mut payload_buf = [0; Self::ENCODED_LEN];
25604        let mut buf = if avail_len < Self::ENCODED_LEN {
25605            payload_buf[0..avail_len].copy_from_slice(__input);
25606            Bytes::new(&payload_buf)
25607        } else {
25608            Bytes::new(__input)
25609        };
25610        let mut __struct = Self::default();
25611        __struct.timestamp = buf.get_u64_le();
25612        __struct.angleofattack = buf.get_f32_le();
25613        __struct.sideslip = buf.get_f32_le();
25614        __struct.angleofattack_valid = buf.get_u8();
25615        __struct.sideslip_valid = buf.get_u8();
25616        Ok(__struct)
25617    }
25618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25619        let mut __tmp = BytesMut::new(bytes);
25620        #[allow(clippy::absurd_extreme_comparisons)]
25621        #[allow(unused_comparisons)]
25622        if __tmp.remaining() < Self::ENCODED_LEN {
25623            panic!(
25624                "buffer is too small (need {} bytes, but got {})",
25625                Self::ENCODED_LEN,
25626                __tmp.remaining(),
25627            )
25628        }
25629        __tmp.put_u64_le(self.timestamp);
25630        __tmp.put_f32_le(self.angleofattack);
25631        __tmp.put_f32_le(self.sideslip);
25632        __tmp.put_u8(self.angleofattack_valid);
25633        __tmp.put_u8(self.sideslip_valid);
25634        if matches!(version, MavlinkVersion::V2) {
25635            let len = __tmp.len();
25636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25637        } else {
25638            __tmp.len()
25639        }
25640    }
25641}
25642#[doc = "id: 373"]
25643#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
25644#[derive(Debug, Clone, PartialEq)]
25645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25647pub struct GENERATOR_STATUS_DATA {
25648    #[doc = "Status flags."]
25649    pub status: MavGeneratorStatusFlag,
25650    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
25651    pub battery_current: f32,
25652    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
25653    pub load_current: f32,
25654    #[doc = "The power being generated. NaN: field not provided"]
25655    pub power_generated: f32,
25656    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
25657    pub bus_voltage: f32,
25658    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
25659    pub bat_current_setpoint: f32,
25660    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
25661    pub runtime: u32,
25662    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
25663    pub time_until_maintenance: i32,
25664    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
25665    pub generator_speed: u16,
25666    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
25667    pub rectifier_temperature: i16,
25668    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
25669    pub generator_temperature: i16,
25670}
25671impl GENERATOR_STATUS_DATA {
25672    pub const ENCODED_LEN: usize = 42usize;
25673    pub const DEFAULT: Self = Self {
25674        status: MavGeneratorStatusFlag::DEFAULT,
25675        battery_current: 0.0_f32,
25676        load_current: 0.0_f32,
25677        power_generated: 0.0_f32,
25678        bus_voltage: 0.0_f32,
25679        bat_current_setpoint: 0.0_f32,
25680        runtime: 0_u32,
25681        time_until_maintenance: 0_i32,
25682        generator_speed: 0_u16,
25683        rectifier_temperature: 0_i16,
25684        generator_temperature: 0_i16,
25685    };
25686    #[cfg(feature = "arbitrary")]
25687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25688        use arbitrary::{Arbitrary, Unstructured};
25689        let mut buf = [0u8; 1024];
25690        rng.fill_bytes(&mut buf);
25691        let mut unstructured = Unstructured::new(&buf);
25692        Self::arbitrary(&mut unstructured).unwrap_or_default()
25693    }
25694}
25695impl Default for GENERATOR_STATUS_DATA {
25696    fn default() -> Self {
25697        Self::DEFAULT.clone()
25698    }
25699}
25700impl MessageData for GENERATOR_STATUS_DATA {
25701    type Message = MavMessage;
25702    const ID: u32 = 373u32;
25703    const NAME: &'static str = "GENERATOR_STATUS";
25704    const EXTRA_CRC: u8 = 117u8;
25705    const ENCODED_LEN: usize = 42usize;
25706    fn deser(
25707        _version: MavlinkVersion,
25708        __input: &[u8],
25709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25710        let avail_len = __input.len();
25711        let mut payload_buf = [0; Self::ENCODED_LEN];
25712        let mut buf = if avail_len < Self::ENCODED_LEN {
25713            payload_buf[0..avail_len].copy_from_slice(__input);
25714            Bytes::new(&payload_buf)
25715        } else {
25716            Bytes::new(__input)
25717        };
25718        let mut __struct = Self::default();
25719        let tmp = buf.get_u64_le();
25720        __struct.status = MavGeneratorStatusFlag::from_bits(
25721            tmp & MavGeneratorStatusFlag::all().bits(),
25722        )
25723        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25724            flag_type: "MavGeneratorStatusFlag",
25725            value: tmp as u32,
25726        })?;
25727        __struct.battery_current = buf.get_f32_le();
25728        __struct.load_current = buf.get_f32_le();
25729        __struct.power_generated = buf.get_f32_le();
25730        __struct.bus_voltage = buf.get_f32_le();
25731        __struct.bat_current_setpoint = buf.get_f32_le();
25732        __struct.runtime = buf.get_u32_le();
25733        __struct.time_until_maintenance = buf.get_i32_le();
25734        __struct.generator_speed = buf.get_u16_le();
25735        __struct.rectifier_temperature = buf.get_i16_le();
25736        __struct.generator_temperature = buf.get_i16_le();
25737        Ok(__struct)
25738    }
25739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25740        let mut __tmp = BytesMut::new(bytes);
25741        #[allow(clippy::absurd_extreme_comparisons)]
25742        #[allow(unused_comparisons)]
25743        if __tmp.remaining() < Self::ENCODED_LEN {
25744            panic!(
25745                "buffer is too small (need {} bytes, but got {})",
25746                Self::ENCODED_LEN,
25747                __tmp.remaining(),
25748            )
25749        }
25750        __tmp.put_u64_le(self.status.bits());
25751        __tmp.put_f32_le(self.battery_current);
25752        __tmp.put_f32_le(self.load_current);
25753        __tmp.put_f32_le(self.power_generated);
25754        __tmp.put_f32_le(self.bus_voltage);
25755        __tmp.put_f32_le(self.bat_current_setpoint);
25756        __tmp.put_u32_le(self.runtime);
25757        __tmp.put_i32_le(self.time_until_maintenance);
25758        __tmp.put_u16_le(self.generator_speed);
25759        __tmp.put_i16_le(self.rectifier_temperature);
25760        __tmp.put_i16_le(self.generator_temperature);
25761        if matches!(version, MavlinkVersion::V2) {
25762            let len = __tmp.len();
25763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25764        } else {
25765            __tmp.len()
25766        }
25767    }
25768}
25769#[doc = "id: 149"]
25770#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
25771#[derive(Debug, Clone, PartialEq)]
25772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25774pub struct LANDING_TARGET_DATA {
25775    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25776    pub time_usec: u64,
25777    #[doc = "X-axis angular offset of the target from the center of the image"]
25778    pub angle_x: f32,
25779    #[doc = "Y-axis angular offset of the target from the center of the image"]
25780    pub angle_y: f32,
25781    #[doc = "Distance to the target from the vehicle"]
25782    pub distance: f32,
25783    #[doc = "Size of target along x-axis"]
25784    pub size_x: f32,
25785    #[doc = "Size of target along y-axis"]
25786    pub size_y: f32,
25787    #[doc = "The ID of the target if multiple targets are present"]
25788    pub target_num: u8,
25789    #[doc = "Coordinate frame used for following fields."]
25790    pub frame: MavFrame,
25791    #[doc = "X Position of the landing target in MAV_FRAME"]
25792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25793    pub x: f32,
25794    #[doc = "Y Position of the landing target in MAV_FRAME"]
25795    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25796    pub y: f32,
25797    #[doc = "Z Position of the landing target in MAV_FRAME"]
25798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25799    pub z: f32,
25800    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
25801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25803    pub q: [f32; 4],
25804    #[doc = "Type of landing target"]
25805    #[cfg_attr(feature = "serde", serde(default))]
25806    pub mavtype: LandingTargetType,
25807    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
25808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25809    pub position_valid: u8,
25810}
25811impl LANDING_TARGET_DATA {
25812    pub const ENCODED_LEN: usize = 60usize;
25813    pub const DEFAULT: Self = Self {
25814        time_usec: 0_u64,
25815        angle_x: 0.0_f32,
25816        angle_y: 0.0_f32,
25817        distance: 0.0_f32,
25818        size_x: 0.0_f32,
25819        size_y: 0.0_f32,
25820        target_num: 0_u8,
25821        frame: MavFrame::DEFAULT,
25822        x: 0.0_f32,
25823        y: 0.0_f32,
25824        z: 0.0_f32,
25825        q: [0.0_f32; 4usize],
25826        mavtype: LandingTargetType::DEFAULT,
25827        position_valid: 0_u8,
25828    };
25829    #[cfg(feature = "arbitrary")]
25830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25831        use arbitrary::{Arbitrary, Unstructured};
25832        let mut buf = [0u8; 1024];
25833        rng.fill_bytes(&mut buf);
25834        let mut unstructured = Unstructured::new(&buf);
25835        Self::arbitrary(&mut unstructured).unwrap_or_default()
25836    }
25837}
25838impl Default for LANDING_TARGET_DATA {
25839    fn default() -> Self {
25840        Self::DEFAULT.clone()
25841    }
25842}
25843impl MessageData for LANDING_TARGET_DATA {
25844    type Message = MavMessage;
25845    const ID: u32 = 149u32;
25846    const NAME: &'static str = "LANDING_TARGET";
25847    const EXTRA_CRC: u8 = 200u8;
25848    const ENCODED_LEN: usize = 60usize;
25849    fn deser(
25850        _version: MavlinkVersion,
25851        __input: &[u8],
25852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25853        let avail_len = __input.len();
25854        let mut payload_buf = [0; Self::ENCODED_LEN];
25855        let mut buf = if avail_len < Self::ENCODED_LEN {
25856            payload_buf[0..avail_len].copy_from_slice(__input);
25857            Bytes::new(&payload_buf)
25858        } else {
25859            Bytes::new(__input)
25860        };
25861        let mut __struct = Self::default();
25862        __struct.time_usec = buf.get_u64_le();
25863        __struct.angle_x = buf.get_f32_le();
25864        __struct.angle_y = buf.get_f32_le();
25865        __struct.distance = buf.get_f32_le();
25866        __struct.size_x = buf.get_f32_le();
25867        __struct.size_y = buf.get_f32_le();
25868        __struct.target_num = buf.get_u8();
25869        let tmp = buf.get_u8();
25870        __struct.frame =
25871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25872                enum_type: "MavFrame",
25873                value: tmp as u32,
25874            })?;
25875        __struct.x = buf.get_f32_le();
25876        __struct.y = buf.get_f32_le();
25877        __struct.z = buf.get_f32_le();
25878        for v in &mut __struct.q {
25879            let val = buf.get_f32_le();
25880            *v = val;
25881        }
25882        let tmp = buf.get_u8();
25883        __struct.mavtype =
25884            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25885                enum_type: "LandingTargetType",
25886                value: tmp as u32,
25887            })?;
25888        __struct.position_valid = buf.get_u8();
25889        Ok(__struct)
25890    }
25891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25892        let mut __tmp = BytesMut::new(bytes);
25893        #[allow(clippy::absurd_extreme_comparisons)]
25894        #[allow(unused_comparisons)]
25895        if __tmp.remaining() < Self::ENCODED_LEN {
25896            panic!(
25897                "buffer is too small (need {} bytes, but got {})",
25898                Self::ENCODED_LEN,
25899                __tmp.remaining(),
25900            )
25901        }
25902        __tmp.put_u64_le(self.time_usec);
25903        __tmp.put_f32_le(self.angle_x);
25904        __tmp.put_f32_le(self.angle_y);
25905        __tmp.put_f32_le(self.distance);
25906        __tmp.put_f32_le(self.size_x);
25907        __tmp.put_f32_le(self.size_y);
25908        __tmp.put_u8(self.target_num);
25909        __tmp.put_u8(self.frame as u8);
25910        __tmp.put_f32_le(self.x);
25911        __tmp.put_f32_le(self.y);
25912        __tmp.put_f32_le(self.z);
25913        for val in &self.q {
25914            __tmp.put_f32_le(*val);
25915        }
25916        __tmp.put_u8(self.mavtype as u8);
25917        __tmp.put_u8(self.position_valid);
25918        if matches!(version, MavlinkVersion::V2) {
25919            let len = __tmp.len();
25920            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25921        } else {
25922            __tmp.len()
25923        }
25924    }
25925}
25926#[doc = "id: 74"]
25927#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
25928#[derive(Debug, Clone, PartialEq)]
25929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25931pub struct VFR_HUD_DATA {
25932    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
25933    pub airspeed: f32,
25934    #[doc = "Current ground speed."]
25935    pub groundspeed: f32,
25936    #[doc = "Current altitude (MSL)."]
25937    pub alt: f32,
25938    #[doc = "Current climb rate."]
25939    pub climb: f32,
25940    #[doc = "Current heading in compass units (0-360, 0=north)."]
25941    pub heading: i16,
25942    #[doc = "Current throttle setting (0 to 100)."]
25943    pub throttle: u16,
25944}
25945impl VFR_HUD_DATA {
25946    pub const ENCODED_LEN: usize = 20usize;
25947    pub const DEFAULT: Self = Self {
25948        airspeed: 0.0_f32,
25949        groundspeed: 0.0_f32,
25950        alt: 0.0_f32,
25951        climb: 0.0_f32,
25952        heading: 0_i16,
25953        throttle: 0_u16,
25954    };
25955    #[cfg(feature = "arbitrary")]
25956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25957        use arbitrary::{Arbitrary, Unstructured};
25958        let mut buf = [0u8; 1024];
25959        rng.fill_bytes(&mut buf);
25960        let mut unstructured = Unstructured::new(&buf);
25961        Self::arbitrary(&mut unstructured).unwrap_or_default()
25962    }
25963}
25964impl Default for VFR_HUD_DATA {
25965    fn default() -> Self {
25966        Self::DEFAULT.clone()
25967    }
25968}
25969impl MessageData for VFR_HUD_DATA {
25970    type Message = MavMessage;
25971    const ID: u32 = 74u32;
25972    const NAME: &'static str = "VFR_HUD";
25973    const EXTRA_CRC: u8 = 20u8;
25974    const ENCODED_LEN: usize = 20usize;
25975    fn deser(
25976        _version: MavlinkVersion,
25977        __input: &[u8],
25978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25979        let avail_len = __input.len();
25980        let mut payload_buf = [0; Self::ENCODED_LEN];
25981        let mut buf = if avail_len < Self::ENCODED_LEN {
25982            payload_buf[0..avail_len].copy_from_slice(__input);
25983            Bytes::new(&payload_buf)
25984        } else {
25985            Bytes::new(__input)
25986        };
25987        let mut __struct = Self::default();
25988        __struct.airspeed = buf.get_f32_le();
25989        __struct.groundspeed = buf.get_f32_le();
25990        __struct.alt = buf.get_f32_le();
25991        __struct.climb = buf.get_f32_le();
25992        __struct.heading = buf.get_i16_le();
25993        __struct.throttle = buf.get_u16_le();
25994        Ok(__struct)
25995    }
25996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25997        let mut __tmp = BytesMut::new(bytes);
25998        #[allow(clippy::absurd_extreme_comparisons)]
25999        #[allow(unused_comparisons)]
26000        if __tmp.remaining() < Self::ENCODED_LEN {
26001            panic!(
26002                "buffer is too small (need {} bytes, but got {})",
26003                Self::ENCODED_LEN,
26004                __tmp.remaining(),
26005            )
26006        }
26007        __tmp.put_f32_le(self.airspeed);
26008        __tmp.put_f32_le(self.groundspeed);
26009        __tmp.put_f32_le(self.alt);
26010        __tmp.put_f32_le(self.climb);
26011        __tmp.put_i16_le(self.heading);
26012        __tmp.put_u16_le(self.throttle);
26013        if matches!(version, MavlinkVersion::V2) {
26014            let len = __tmp.len();
26015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26016        } else {
26017            __tmp.len()
26018        }
26019    }
26020}
26021#[doc = "id: 122"]
26022#[doc = "Stop log transfer and resume normal logging."]
26023#[derive(Debug, Clone, PartialEq)]
26024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26026pub struct LOG_REQUEST_END_DATA {
26027    #[doc = "System ID"]
26028    pub target_system: u8,
26029    #[doc = "Component ID"]
26030    pub target_component: u8,
26031}
26032impl LOG_REQUEST_END_DATA {
26033    pub const ENCODED_LEN: usize = 2usize;
26034    pub const DEFAULT: Self = Self {
26035        target_system: 0_u8,
26036        target_component: 0_u8,
26037    };
26038    #[cfg(feature = "arbitrary")]
26039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26040        use arbitrary::{Arbitrary, Unstructured};
26041        let mut buf = [0u8; 1024];
26042        rng.fill_bytes(&mut buf);
26043        let mut unstructured = Unstructured::new(&buf);
26044        Self::arbitrary(&mut unstructured).unwrap_or_default()
26045    }
26046}
26047impl Default for LOG_REQUEST_END_DATA {
26048    fn default() -> Self {
26049        Self::DEFAULT.clone()
26050    }
26051}
26052impl MessageData for LOG_REQUEST_END_DATA {
26053    type Message = MavMessage;
26054    const ID: u32 = 122u32;
26055    const NAME: &'static str = "LOG_REQUEST_END";
26056    const EXTRA_CRC: u8 = 203u8;
26057    const ENCODED_LEN: usize = 2usize;
26058    fn deser(
26059        _version: MavlinkVersion,
26060        __input: &[u8],
26061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26062        let avail_len = __input.len();
26063        let mut payload_buf = [0; Self::ENCODED_LEN];
26064        let mut buf = if avail_len < Self::ENCODED_LEN {
26065            payload_buf[0..avail_len].copy_from_slice(__input);
26066            Bytes::new(&payload_buf)
26067        } else {
26068            Bytes::new(__input)
26069        };
26070        let mut __struct = Self::default();
26071        __struct.target_system = buf.get_u8();
26072        __struct.target_component = buf.get_u8();
26073        Ok(__struct)
26074    }
26075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26076        let mut __tmp = BytesMut::new(bytes);
26077        #[allow(clippy::absurd_extreme_comparisons)]
26078        #[allow(unused_comparisons)]
26079        if __tmp.remaining() < Self::ENCODED_LEN {
26080            panic!(
26081                "buffer is too small (need {} bytes, but got {})",
26082                Self::ENCODED_LEN,
26083                __tmp.remaining(),
26084            )
26085        }
26086        __tmp.put_u8(self.target_system);
26087        __tmp.put_u8(self.target_component);
26088        if matches!(version, MavlinkVersion::V2) {
26089            let len = __tmp.len();
26090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26091        } else {
26092            __tmp.len()
26093        }
26094    }
26095}
26096#[doc = "id: 388"]
26097#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
26098#[derive(Debug, Clone, PartialEq)]
26099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26101pub struct CAN_FILTER_MODIFY_DATA {
26102    #[doc = "filter IDs, length num_ids"]
26103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26104    pub ids: [u16; 16],
26105    #[doc = "System ID."]
26106    pub target_system: u8,
26107    #[doc = "Component ID."]
26108    pub target_component: u8,
26109    #[doc = "bus number"]
26110    pub bus: u8,
26111    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
26112    pub operation: CanFilterOp,
26113    #[doc = "number of IDs in filter list"]
26114    pub num_ids: u8,
26115}
26116impl CAN_FILTER_MODIFY_DATA {
26117    pub const ENCODED_LEN: usize = 37usize;
26118    pub const DEFAULT: Self = Self {
26119        ids: [0_u16; 16usize],
26120        target_system: 0_u8,
26121        target_component: 0_u8,
26122        bus: 0_u8,
26123        operation: CanFilterOp::DEFAULT,
26124        num_ids: 0_u8,
26125    };
26126    #[cfg(feature = "arbitrary")]
26127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26128        use arbitrary::{Arbitrary, Unstructured};
26129        let mut buf = [0u8; 1024];
26130        rng.fill_bytes(&mut buf);
26131        let mut unstructured = Unstructured::new(&buf);
26132        Self::arbitrary(&mut unstructured).unwrap_or_default()
26133    }
26134}
26135impl Default for CAN_FILTER_MODIFY_DATA {
26136    fn default() -> Self {
26137        Self::DEFAULT.clone()
26138    }
26139}
26140impl MessageData for CAN_FILTER_MODIFY_DATA {
26141    type Message = MavMessage;
26142    const ID: u32 = 388u32;
26143    const NAME: &'static str = "CAN_FILTER_MODIFY";
26144    const EXTRA_CRC: u8 = 8u8;
26145    const ENCODED_LEN: usize = 37usize;
26146    fn deser(
26147        _version: MavlinkVersion,
26148        __input: &[u8],
26149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26150        let avail_len = __input.len();
26151        let mut payload_buf = [0; Self::ENCODED_LEN];
26152        let mut buf = if avail_len < Self::ENCODED_LEN {
26153            payload_buf[0..avail_len].copy_from_slice(__input);
26154            Bytes::new(&payload_buf)
26155        } else {
26156            Bytes::new(__input)
26157        };
26158        let mut __struct = Self::default();
26159        for v in &mut __struct.ids {
26160            let val = buf.get_u16_le();
26161            *v = val;
26162        }
26163        __struct.target_system = buf.get_u8();
26164        __struct.target_component = buf.get_u8();
26165        __struct.bus = buf.get_u8();
26166        let tmp = buf.get_u8();
26167        __struct.operation =
26168            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26169                enum_type: "CanFilterOp",
26170                value: tmp as u32,
26171            })?;
26172        __struct.num_ids = buf.get_u8();
26173        Ok(__struct)
26174    }
26175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26176        let mut __tmp = BytesMut::new(bytes);
26177        #[allow(clippy::absurd_extreme_comparisons)]
26178        #[allow(unused_comparisons)]
26179        if __tmp.remaining() < Self::ENCODED_LEN {
26180            panic!(
26181                "buffer is too small (need {} bytes, but got {})",
26182                Self::ENCODED_LEN,
26183                __tmp.remaining(),
26184            )
26185        }
26186        for val in &self.ids {
26187            __tmp.put_u16_le(*val);
26188        }
26189        __tmp.put_u8(self.target_system);
26190        __tmp.put_u8(self.target_component);
26191        __tmp.put_u8(self.bus);
26192        __tmp.put_u8(self.operation as u8);
26193        __tmp.put_u8(self.num_ids);
26194        if matches!(version, MavlinkVersion::V2) {
26195            let len = __tmp.len();
26196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26197        } else {
26198            __tmp.len()
26199        }
26200    }
26201}
26202#[doc = "id: 130"]
26203#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
26204#[derive(Debug, Clone, PartialEq)]
26205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26207pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
26208    #[doc = "total data size (set on ACK only)."]
26209    pub size: u32,
26210    #[doc = "Width of a matrix or image."]
26211    pub width: u16,
26212    #[doc = "Height of a matrix or image."]
26213    pub height: u16,
26214    #[doc = "Number of packets being sent (set on ACK only)."]
26215    pub packets: u16,
26216    #[doc = "Type of requested/acknowledged data."]
26217    pub mavtype: MavlinkDataStreamType,
26218    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
26219    pub payload: u8,
26220    #[doc = "JPEG quality. Values: [1-100]."]
26221    pub jpg_quality: u8,
26222}
26223impl DATA_TRANSMISSION_HANDSHAKE_DATA {
26224    pub const ENCODED_LEN: usize = 13usize;
26225    pub const DEFAULT: Self = Self {
26226        size: 0_u32,
26227        width: 0_u16,
26228        height: 0_u16,
26229        packets: 0_u16,
26230        mavtype: MavlinkDataStreamType::DEFAULT,
26231        payload: 0_u8,
26232        jpg_quality: 0_u8,
26233    };
26234    #[cfg(feature = "arbitrary")]
26235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26236        use arbitrary::{Arbitrary, Unstructured};
26237        let mut buf = [0u8; 1024];
26238        rng.fill_bytes(&mut buf);
26239        let mut unstructured = Unstructured::new(&buf);
26240        Self::arbitrary(&mut unstructured).unwrap_or_default()
26241    }
26242}
26243impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
26244    fn default() -> Self {
26245        Self::DEFAULT.clone()
26246    }
26247}
26248impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
26249    type Message = MavMessage;
26250    const ID: u32 = 130u32;
26251    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
26252    const EXTRA_CRC: u8 = 29u8;
26253    const ENCODED_LEN: usize = 13usize;
26254    fn deser(
26255        _version: MavlinkVersion,
26256        __input: &[u8],
26257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26258        let avail_len = __input.len();
26259        let mut payload_buf = [0; Self::ENCODED_LEN];
26260        let mut buf = if avail_len < Self::ENCODED_LEN {
26261            payload_buf[0..avail_len].copy_from_slice(__input);
26262            Bytes::new(&payload_buf)
26263        } else {
26264            Bytes::new(__input)
26265        };
26266        let mut __struct = Self::default();
26267        __struct.size = buf.get_u32_le();
26268        __struct.width = buf.get_u16_le();
26269        __struct.height = buf.get_u16_le();
26270        __struct.packets = buf.get_u16_le();
26271        let tmp = buf.get_u8();
26272        __struct.mavtype =
26273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26274                enum_type: "MavlinkDataStreamType",
26275                value: tmp as u32,
26276            })?;
26277        __struct.payload = buf.get_u8();
26278        __struct.jpg_quality = buf.get_u8();
26279        Ok(__struct)
26280    }
26281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26282        let mut __tmp = BytesMut::new(bytes);
26283        #[allow(clippy::absurd_extreme_comparisons)]
26284        #[allow(unused_comparisons)]
26285        if __tmp.remaining() < Self::ENCODED_LEN {
26286            panic!(
26287                "buffer is too small (need {} bytes, but got {})",
26288                Self::ENCODED_LEN,
26289                __tmp.remaining(),
26290            )
26291        }
26292        __tmp.put_u32_le(self.size);
26293        __tmp.put_u16_le(self.width);
26294        __tmp.put_u16_le(self.height);
26295        __tmp.put_u16_le(self.packets);
26296        __tmp.put_u8(self.mavtype as u8);
26297        __tmp.put_u8(self.payload);
26298        __tmp.put_u8(self.jpg_quality);
26299        if matches!(version, MavlinkVersion::V2) {
26300            let len = __tmp.len();
26301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26302        } else {
26303            __tmp.len()
26304        }
26305    }
26306}
26307#[doc = "id: 262"]
26308#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
26309#[derive(Debug, Clone, PartialEq)]
26310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26312pub struct CAMERA_CAPTURE_STATUS_DATA {
26313    #[doc = "Timestamp (time since system boot)."]
26314    pub time_boot_ms: u32,
26315    #[doc = "Image capture interval"]
26316    pub image_interval: f32,
26317    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
26318    pub recording_time_ms: u32,
26319    #[doc = "Available storage capacity."]
26320    pub available_capacity: f32,
26321    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
26322    pub image_status: u8,
26323    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
26324    pub video_status: u8,
26325    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
26326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26327    pub image_count: i32,
26328    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
26329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26330    pub camera_device_id: u8,
26331}
26332impl CAMERA_CAPTURE_STATUS_DATA {
26333    pub const ENCODED_LEN: usize = 23usize;
26334    pub const DEFAULT: Self = Self {
26335        time_boot_ms: 0_u32,
26336        image_interval: 0.0_f32,
26337        recording_time_ms: 0_u32,
26338        available_capacity: 0.0_f32,
26339        image_status: 0_u8,
26340        video_status: 0_u8,
26341        image_count: 0_i32,
26342        camera_device_id: 0_u8,
26343    };
26344    #[cfg(feature = "arbitrary")]
26345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26346        use arbitrary::{Arbitrary, Unstructured};
26347        let mut buf = [0u8; 1024];
26348        rng.fill_bytes(&mut buf);
26349        let mut unstructured = Unstructured::new(&buf);
26350        Self::arbitrary(&mut unstructured).unwrap_or_default()
26351    }
26352}
26353impl Default for CAMERA_CAPTURE_STATUS_DATA {
26354    fn default() -> Self {
26355        Self::DEFAULT.clone()
26356    }
26357}
26358impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
26359    type Message = MavMessage;
26360    const ID: u32 = 262u32;
26361    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
26362    const EXTRA_CRC: u8 = 12u8;
26363    const ENCODED_LEN: usize = 23usize;
26364    fn deser(
26365        _version: MavlinkVersion,
26366        __input: &[u8],
26367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26368        let avail_len = __input.len();
26369        let mut payload_buf = [0; Self::ENCODED_LEN];
26370        let mut buf = if avail_len < Self::ENCODED_LEN {
26371            payload_buf[0..avail_len].copy_from_slice(__input);
26372            Bytes::new(&payload_buf)
26373        } else {
26374            Bytes::new(__input)
26375        };
26376        let mut __struct = Self::default();
26377        __struct.time_boot_ms = buf.get_u32_le();
26378        __struct.image_interval = buf.get_f32_le();
26379        __struct.recording_time_ms = buf.get_u32_le();
26380        __struct.available_capacity = buf.get_f32_le();
26381        __struct.image_status = buf.get_u8();
26382        __struct.video_status = buf.get_u8();
26383        __struct.image_count = buf.get_i32_le();
26384        __struct.camera_device_id = buf.get_u8();
26385        Ok(__struct)
26386    }
26387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26388        let mut __tmp = BytesMut::new(bytes);
26389        #[allow(clippy::absurd_extreme_comparisons)]
26390        #[allow(unused_comparisons)]
26391        if __tmp.remaining() < Self::ENCODED_LEN {
26392            panic!(
26393                "buffer is too small (need {} bytes, but got {})",
26394                Self::ENCODED_LEN,
26395                __tmp.remaining(),
26396            )
26397        }
26398        __tmp.put_u32_le(self.time_boot_ms);
26399        __tmp.put_f32_le(self.image_interval);
26400        __tmp.put_u32_le(self.recording_time_ms);
26401        __tmp.put_f32_le(self.available_capacity);
26402        __tmp.put_u8(self.image_status);
26403        __tmp.put_u8(self.video_status);
26404        __tmp.put_i32_le(self.image_count);
26405        __tmp.put_u8(self.camera_device_id);
26406        if matches!(version, MavlinkVersion::V2) {
26407            let len = __tmp.len();
26408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26409        } else {
26410            __tmp.len()
26411        }
26412    }
26413}
26414#[doc = "id: 8009"]
26415#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
26416#[derive(Debug, Clone, PartialEq)]
26417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26419pub struct SENS_ATMOS_DATA {
26420    #[doc = "Time since system boot"]
26421    pub timestamp: u64,
26422    #[doc = "Ambient temperature"]
26423    pub TempAmbient: f32,
26424    #[doc = "Relative humidity"]
26425    pub Humidity: f32,
26426}
26427impl SENS_ATMOS_DATA {
26428    pub const ENCODED_LEN: usize = 16usize;
26429    pub const DEFAULT: Self = Self {
26430        timestamp: 0_u64,
26431        TempAmbient: 0.0_f32,
26432        Humidity: 0.0_f32,
26433    };
26434    #[cfg(feature = "arbitrary")]
26435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26436        use arbitrary::{Arbitrary, Unstructured};
26437        let mut buf = [0u8; 1024];
26438        rng.fill_bytes(&mut buf);
26439        let mut unstructured = Unstructured::new(&buf);
26440        Self::arbitrary(&mut unstructured).unwrap_or_default()
26441    }
26442}
26443impl Default for SENS_ATMOS_DATA {
26444    fn default() -> Self {
26445        Self::DEFAULT.clone()
26446    }
26447}
26448impl MessageData for SENS_ATMOS_DATA {
26449    type Message = MavMessage;
26450    const ID: u32 = 8009u32;
26451    const NAME: &'static str = "SENS_ATMOS";
26452    const EXTRA_CRC: u8 = 144u8;
26453    const ENCODED_LEN: usize = 16usize;
26454    fn deser(
26455        _version: MavlinkVersion,
26456        __input: &[u8],
26457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26458        let avail_len = __input.len();
26459        let mut payload_buf = [0; Self::ENCODED_LEN];
26460        let mut buf = if avail_len < Self::ENCODED_LEN {
26461            payload_buf[0..avail_len].copy_from_slice(__input);
26462            Bytes::new(&payload_buf)
26463        } else {
26464            Bytes::new(__input)
26465        };
26466        let mut __struct = Self::default();
26467        __struct.timestamp = buf.get_u64_le();
26468        __struct.TempAmbient = buf.get_f32_le();
26469        __struct.Humidity = buf.get_f32_le();
26470        Ok(__struct)
26471    }
26472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26473        let mut __tmp = BytesMut::new(bytes);
26474        #[allow(clippy::absurd_extreme_comparisons)]
26475        #[allow(unused_comparisons)]
26476        if __tmp.remaining() < Self::ENCODED_LEN {
26477            panic!(
26478                "buffer is too small (need {} bytes, but got {})",
26479                Self::ENCODED_LEN,
26480                __tmp.remaining(),
26481            )
26482        }
26483        __tmp.put_u64_le(self.timestamp);
26484        __tmp.put_f32_le(self.TempAmbient);
26485        __tmp.put_f32_le(self.Humidity);
26486        if matches!(version, MavlinkVersion::V2) {
26487            let len = __tmp.len();
26488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26489        } else {
26490            __tmp.len()
26491        }
26492    }
26493}
26494#[doc = "id: 396"]
26495#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
26496#[derive(Debug, Clone, PartialEq)]
26497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26499pub struct COMPONENT_INFORMATION_BASIC_DATA {
26500    #[doc = "Component capability flags"]
26501    pub capabilities: MavProtocolCapability,
26502    #[doc = "Timestamp (time since system boot)."]
26503    pub time_boot_ms: u32,
26504    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
26505    pub time_manufacture_s: u32,
26506    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
26507    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26508    pub vendor_name: [u8; 32],
26509    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
26510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26511    pub model_name: [u8; 32],
26512    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
26513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26514    pub software_version: [u8; 24],
26515    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
26516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26517    pub hardware_version: [u8; 24],
26518    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
26519    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26520    pub serial_number: [u8; 32],
26521}
26522impl COMPONENT_INFORMATION_BASIC_DATA {
26523    pub const ENCODED_LEN: usize = 160usize;
26524    pub const DEFAULT: Self = Self {
26525        capabilities: MavProtocolCapability::DEFAULT,
26526        time_boot_ms: 0_u32,
26527        time_manufacture_s: 0_u32,
26528        vendor_name: [0_u8; 32usize],
26529        model_name: [0_u8; 32usize],
26530        software_version: [0_u8; 24usize],
26531        hardware_version: [0_u8; 24usize],
26532        serial_number: [0_u8; 32usize],
26533    };
26534    #[cfg(feature = "arbitrary")]
26535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26536        use arbitrary::{Arbitrary, Unstructured};
26537        let mut buf = [0u8; 1024];
26538        rng.fill_bytes(&mut buf);
26539        let mut unstructured = Unstructured::new(&buf);
26540        Self::arbitrary(&mut unstructured).unwrap_or_default()
26541    }
26542}
26543impl Default for COMPONENT_INFORMATION_BASIC_DATA {
26544    fn default() -> Self {
26545        Self::DEFAULT.clone()
26546    }
26547}
26548impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
26549    type Message = MavMessage;
26550    const ID: u32 = 396u32;
26551    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
26552    const EXTRA_CRC: u8 = 50u8;
26553    const ENCODED_LEN: usize = 160usize;
26554    fn deser(
26555        _version: MavlinkVersion,
26556        __input: &[u8],
26557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26558        let avail_len = __input.len();
26559        let mut payload_buf = [0; Self::ENCODED_LEN];
26560        let mut buf = if avail_len < Self::ENCODED_LEN {
26561            payload_buf[0..avail_len].copy_from_slice(__input);
26562            Bytes::new(&payload_buf)
26563        } else {
26564            Bytes::new(__input)
26565        };
26566        let mut __struct = Self::default();
26567        let tmp = buf.get_u64_le();
26568        __struct.capabilities = MavProtocolCapability::from_bits(
26569            tmp & MavProtocolCapability::all().bits(),
26570        )
26571        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26572            flag_type: "MavProtocolCapability",
26573            value: tmp as u32,
26574        })?;
26575        __struct.time_boot_ms = buf.get_u32_le();
26576        __struct.time_manufacture_s = buf.get_u32_le();
26577        for v in &mut __struct.vendor_name {
26578            let val = buf.get_u8();
26579            *v = val;
26580        }
26581        for v in &mut __struct.model_name {
26582            let val = buf.get_u8();
26583            *v = val;
26584        }
26585        for v in &mut __struct.software_version {
26586            let val = buf.get_u8();
26587            *v = val;
26588        }
26589        for v in &mut __struct.hardware_version {
26590            let val = buf.get_u8();
26591            *v = val;
26592        }
26593        for v in &mut __struct.serial_number {
26594            let val = buf.get_u8();
26595            *v = val;
26596        }
26597        Ok(__struct)
26598    }
26599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26600        let mut __tmp = BytesMut::new(bytes);
26601        #[allow(clippy::absurd_extreme_comparisons)]
26602        #[allow(unused_comparisons)]
26603        if __tmp.remaining() < Self::ENCODED_LEN {
26604            panic!(
26605                "buffer is too small (need {} bytes, but got {})",
26606                Self::ENCODED_LEN,
26607                __tmp.remaining(),
26608            )
26609        }
26610        __tmp.put_u64_le(self.capabilities.bits());
26611        __tmp.put_u32_le(self.time_boot_ms);
26612        __tmp.put_u32_le(self.time_manufacture_s);
26613        for val in &self.vendor_name {
26614            __tmp.put_u8(*val);
26615        }
26616        for val in &self.model_name {
26617            __tmp.put_u8(*val);
26618        }
26619        for val in &self.software_version {
26620            __tmp.put_u8(*val);
26621        }
26622        for val in &self.hardware_version {
26623            __tmp.put_u8(*val);
26624        }
26625        for val in &self.serial_number {
26626            __tmp.put_u8(*val);
26627        }
26628        if matches!(version, MavlinkVersion::V2) {
26629            let len = __tmp.len();
26630            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26631        } else {
26632            __tmp.len()
26633        }
26634    }
26635}
26636#[doc = "id: 26"]
26637#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26638#[derive(Debug, Clone, PartialEq)]
26639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26641pub struct SCALED_IMU_DATA {
26642    #[doc = "Timestamp (time since system boot)."]
26643    pub time_boot_ms: u32,
26644    #[doc = "X acceleration"]
26645    pub xacc: i16,
26646    #[doc = "Y acceleration"]
26647    pub yacc: i16,
26648    #[doc = "Z acceleration"]
26649    pub zacc: i16,
26650    #[doc = "Angular speed around X axis"]
26651    pub xgyro: i16,
26652    #[doc = "Angular speed around Y axis"]
26653    pub ygyro: i16,
26654    #[doc = "Angular speed around Z axis"]
26655    pub zgyro: i16,
26656    #[doc = "X Magnetic field"]
26657    pub xmag: i16,
26658    #[doc = "Y Magnetic field"]
26659    pub ymag: i16,
26660    #[doc = "Z Magnetic field"]
26661    pub zmag: i16,
26662    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26664    pub temperature: i16,
26665}
26666impl SCALED_IMU_DATA {
26667    pub const ENCODED_LEN: usize = 24usize;
26668    pub const DEFAULT: Self = Self {
26669        time_boot_ms: 0_u32,
26670        xacc: 0_i16,
26671        yacc: 0_i16,
26672        zacc: 0_i16,
26673        xgyro: 0_i16,
26674        ygyro: 0_i16,
26675        zgyro: 0_i16,
26676        xmag: 0_i16,
26677        ymag: 0_i16,
26678        zmag: 0_i16,
26679        temperature: 0_i16,
26680    };
26681    #[cfg(feature = "arbitrary")]
26682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26683        use arbitrary::{Arbitrary, Unstructured};
26684        let mut buf = [0u8; 1024];
26685        rng.fill_bytes(&mut buf);
26686        let mut unstructured = Unstructured::new(&buf);
26687        Self::arbitrary(&mut unstructured).unwrap_or_default()
26688    }
26689}
26690impl Default for SCALED_IMU_DATA {
26691    fn default() -> Self {
26692        Self::DEFAULT.clone()
26693    }
26694}
26695impl MessageData for SCALED_IMU_DATA {
26696    type Message = MavMessage;
26697    const ID: u32 = 26u32;
26698    const NAME: &'static str = "SCALED_IMU";
26699    const EXTRA_CRC: u8 = 170u8;
26700    const ENCODED_LEN: usize = 24usize;
26701    fn deser(
26702        _version: MavlinkVersion,
26703        __input: &[u8],
26704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26705        let avail_len = __input.len();
26706        let mut payload_buf = [0; Self::ENCODED_LEN];
26707        let mut buf = if avail_len < Self::ENCODED_LEN {
26708            payload_buf[0..avail_len].copy_from_slice(__input);
26709            Bytes::new(&payload_buf)
26710        } else {
26711            Bytes::new(__input)
26712        };
26713        let mut __struct = Self::default();
26714        __struct.time_boot_ms = buf.get_u32_le();
26715        __struct.xacc = buf.get_i16_le();
26716        __struct.yacc = buf.get_i16_le();
26717        __struct.zacc = buf.get_i16_le();
26718        __struct.xgyro = buf.get_i16_le();
26719        __struct.ygyro = buf.get_i16_le();
26720        __struct.zgyro = buf.get_i16_le();
26721        __struct.xmag = buf.get_i16_le();
26722        __struct.ymag = buf.get_i16_le();
26723        __struct.zmag = buf.get_i16_le();
26724        __struct.temperature = buf.get_i16_le();
26725        Ok(__struct)
26726    }
26727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26728        let mut __tmp = BytesMut::new(bytes);
26729        #[allow(clippy::absurd_extreme_comparisons)]
26730        #[allow(unused_comparisons)]
26731        if __tmp.remaining() < Self::ENCODED_LEN {
26732            panic!(
26733                "buffer is too small (need {} bytes, but got {})",
26734                Self::ENCODED_LEN,
26735                __tmp.remaining(),
26736            )
26737        }
26738        __tmp.put_u32_le(self.time_boot_ms);
26739        __tmp.put_i16_le(self.xacc);
26740        __tmp.put_i16_le(self.yacc);
26741        __tmp.put_i16_le(self.zacc);
26742        __tmp.put_i16_le(self.xgyro);
26743        __tmp.put_i16_le(self.ygyro);
26744        __tmp.put_i16_le(self.zgyro);
26745        __tmp.put_i16_le(self.xmag);
26746        __tmp.put_i16_le(self.ymag);
26747        __tmp.put_i16_le(self.zmag);
26748        __tmp.put_i16_le(self.temperature);
26749        if matches!(version, MavlinkVersion::V2) {
26750            let len = __tmp.len();
26751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26752        } else {
26753            __tmp.len()
26754        }
26755    }
26756}
26757#[doc = "id: 70"]
26758#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26759#[derive(Debug, Clone, PartialEq)]
26760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26762pub struct RC_CHANNELS_OVERRIDE_DATA {
26763    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26764    pub chan1_raw: u16,
26765    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26766    pub chan2_raw: u16,
26767    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26768    pub chan3_raw: u16,
26769    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26770    pub chan4_raw: u16,
26771    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26772    pub chan5_raw: u16,
26773    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26774    pub chan6_raw: u16,
26775    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26776    pub chan7_raw: u16,
26777    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26778    pub chan8_raw: u16,
26779    #[doc = "System ID"]
26780    pub target_system: u8,
26781    #[doc = "Component ID"]
26782    pub target_component: u8,
26783    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26785    pub chan9_raw: u16,
26786    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26788    pub chan10_raw: u16,
26789    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26791    pub chan11_raw: u16,
26792    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26794    pub chan12_raw: u16,
26795    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26797    pub chan13_raw: u16,
26798    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26800    pub chan14_raw: u16,
26801    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26803    pub chan15_raw: u16,
26804    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26806    pub chan16_raw: u16,
26807    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26808    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26809    pub chan17_raw: u16,
26810    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26812    pub chan18_raw: u16,
26813}
26814impl RC_CHANNELS_OVERRIDE_DATA {
26815    pub const ENCODED_LEN: usize = 38usize;
26816    pub const DEFAULT: Self = Self {
26817        chan1_raw: 0_u16,
26818        chan2_raw: 0_u16,
26819        chan3_raw: 0_u16,
26820        chan4_raw: 0_u16,
26821        chan5_raw: 0_u16,
26822        chan6_raw: 0_u16,
26823        chan7_raw: 0_u16,
26824        chan8_raw: 0_u16,
26825        target_system: 0_u8,
26826        target_component: 0_u8,
26827        chan9_raw: 0_u16,
26828        chan10_raw: 0_u16,
26829        chan11_raw: 0_u16,
26830        chan12_raw: 0_u16,
26831        chan13_raw: 0_u16,
26832        chan14_raw: 0_u16,
26833        chan15_raw: 0_u16,
26834        chan16_raw: 0_u16,
26835        chan17_raw: 0_u16,
26836        chan18_raw: 0_u16,
26837    };
26838    #[cfg(feature = "arbitrary")]
26839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26840        use arbitrary::{Arbitrary, Unstructured};
26841        let mut buf = [0u8; 1024];
26842        rng.fill_bytes(&mut buf);
26843        let mut unstructured = Unstructured::new(&buf);
26844        Self::arbitrary(&mut unstructured).unwrap_or_default()
26845    }
26846}
26847impl Default for RC_CHANNELS_OVERRIDE_DATA {
26848    fn default() -> Self {
26849        Self::DEFAULT.clone()
26850    }
26851}
26852impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26853    type Message = MavMessage;
26854    const ID: u32 = 70u32;
26855    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26856    const EXTRA_CRC: u8 = 124u8;
26857    const ENCODED_LEN: usize = 38usize;
26858    fn deser(
26859        _version: MavlinkVersion,
26860        __input: &[u8],
26861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26862        let avail_len = __input.len();
26863        let mut payload_buf = [0; Self::ENCODED_LEN];
26864        let mut buf = if avail_len < Self::ENCODED_LEN {
26865            payload_buf[0..avail_len].copy_from_slice(__input);
26866            Bytes::new(&payload_buf)
26867        } else {
26868            Bytes::new(__input)
26869        };
26870        let mut __struct = Self::default();
26871        __struct.chan1_raw = buf.get_u16_le();
26872        __struct.chan2_raw = buf.get_u16_le();
26873        __struct.chan3_raw = buf.get_u16_le();
26874        __struct.chan4_raw = buf.get_u16_le();
26875        __struct.chan5_raw = buf.get_u16_le();
26876        __struct.chan6_raw = buf.get_u16_le();
26877        __struct.chan7_raw = buf.get_u16_le();
26878        __struct.chan8_raw = buf.get_u16_le();
26879        __struct.target_system = buf.get_u8();
26880        __struct.target_component = buf.get_u8();
26881        __struct.chan9_raw = buf.get_u16_le();
26882        __struct.chan10_raw = buf.get_u16_le();
26883        __struct.chan11_raw = buf.get_u16_le();
26884        __struct.chan12_raw = buf.get_u16_le();
26885        __struct.chan13_raw = buf.get_u16_le();
26886        __struct.chan14_raw = buf.get_u16_le();
26887        __struct.chan15_raw = buf.get_u16_le();
26888        __struct.chan16_raw = buf.get_u16_le();
26889        __struct.chan17_raw = buf.get_u16_le();
26890        __struct.chan18_raw = buf.get_u16_le();
26891        Ok(__struct)
26892    }
26893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26894        let mut __tmp = BytesMut::new(bytes);
26895        #[allow(clippy::absurd_extreme_comparisons)]
26896        #[allow(unused_comparisons)]
26897        if __tmp.remaining() < Self::ENCODED_LEN {
26898            panic!(
26899                "buffer is too small (need {} bytes, but got {})",
26900                Self::ENCODED_LEN,
26901                __tmp.remaining(),
26902            )
26903        }
26904        __tmp.put_u16_le(self.chan1_raw);
26905        __tmp.put_u16_le(self.chan2_raw);
26906        __tmp.put_u16_le(self.chan3_raw);
26907        __tmp.put_u16_le(self.chan4_raw);
26908        __tmp.put_u16_le(self.chan5_raw);
26909        __tmp.put_u16_le(self.chan6_raw);
26910        __tmp.put_u16_le(self.chan7_raw);
26911        __tmp.put_u16_le(self.chan8_raw);
26912        __tmp.put_u8(self.target_system);
26913        __tmp.put_u8(self.target_component);
26914        __tmp.put_u16_le(self.chan9_raw);
26915        __tmp.put_u16_le(self.chan10_raw);
26916        __tmp.put_u16_le(self.chan11_raw);
26917        __tmp.put_u16_le(self.chan12_raw);
26918        __tmp.put_u16_le(self.chan13_raw);
26919        __tmp.put_u16_le(self.chan14_raw);
26920        __tmp.put_u16_le(self.chan15_raw);
26921        __tmp.put_u16_le(self.chan16_raw);
26922        __tmp.put_u16_le(self.chan17_raw);
26923        __tmp.put_u16_le(self.chan18_raw);
26924        if matches!(version, MavlinkVersion::V2) {
26925            let len = __tmp.len();
26926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26927        } else {
26928            __tmp.len()
26929        }
26930    }
26931}
26932#[doc = "id: 7"]
26933#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
26934#[derive(Debug, Clone, PartialEq)]
26935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26937pub struct AUTH_KEY_DATA {
26938    #[doc = "key"]
26939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26940    pub key: [u8; 32],
26941}
26942impl AUTH_KEY_DATA {
26943    pub const ENCODED_LEN: usize = 32usize;
26944    pub const DEFAULT: Self = Self {
26945        key: [0_u8; 32usize],
26946    };
26947    #[cfg(feature = "arbitrary")]
26948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26949        use arbitrary::{Arbitrary, Unstructured};
26950        let mut buf = [0u8; 1024];
26951        rng.fill_bytes(&mut buf);
26952        let mut unstructured = Unstructured::new(&buf);
26953        Self::arbitrary(&mut unstructured).unwrap_or_default()
26954    }
26955}
26956impl Default for AUTH_KEY_DATA {
26957    fn default() -> Self {
26958        Self::DEFAULT.clone()
26959    }
26960}
26961impl MessageData for AUTH_KEY_DATA {
26962    type Message = MavMessage;
26963    const ID: u32 = 7u32;
26964    const NAME: &'static str = "AUTH_KEY";
26965    const EXTRA_CRC: u8 = 119u8;
26966    const ENCODED_LEN: usize = 32usize;
26967    fn deser(
26968        _version: MavlinkVersion,
26969        __input: &[u8],
26970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26971        let avail_len = __input.len();
26972        let mut payload_buf = [0; Self::ENCODED_LEN];
26973        let mut buf = if avail_len < Self::ENCODED_LEN {
26974            payload_buf[0..avail_len].copy_from_slice(__input);
26975            Bytes::new(&payload_buf)
26976        } else {
26977            Bytes::new(__input)
26978        };
26979        let mut __struct = Self::default();
26980        for v in &mut __struct.key {
26981            let val = buf.get_u8();
26982            *v = val;
26983        }
26984        Ok(__struct)
26985    }
26986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26987        let mut __tmp = BytesMut::new(bytes);
26988        #[allow(clippy::absurd_extreme_comparisons)]
26989        #[allow(unused_comparisons)]
26990        if __tmp.remaining() < Self::ENCODED_LEN {
26991            panic!(
26992                "buffer is too small (need {} bytes, but got {})",
26993                Self::ENCODED_LEN,
26994                __tmp.remaining(),
26995            )
26996        }
26997        for val in &self.key {
26998            __tmp.put_u8(*val);
26999        }
27000        if matches!(version, MavlinkVersion::V2) {
27001            let len = __tmp.len();
27002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27003        } else {
27004            __tmp.len()
27005        }
27006    }
27007}
27008#[doc = "id: 33"]
27009#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
27010#[derive(Debug, Clone, PartialEq)]
27011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27013pub struct GLOBAL_POSITION_INT_DATA {
27014    #[doc = "Timestamp (time since system boot)."]
27015    pub time_boot_ms: u32,
27016    #[doc = "Latitude, expressed"]
27017    pub lat: i32,
27018    #[doc = "Longitude, expressed"]
27019    pub lon: i32,
27020    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
27021    pub alt: i32,
27022    #[doc = "Altitude above home"]
27023    pub relative_alt: i32,
27024    #[doc = "Ground X Speed (Latitude, positive north)"]
27025    pub vx: i16,
27026    #[doc = "Ground Y Speed (Longitude, positive east)"]
27027    pub vy: i16,
27028    #[doc = "Ground Z Speed (Altitude, positive down)"]
27029    pub vz: i16,
27030    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
27031    pub hdg: u16,
27032}
27033impl GLOBAL_POSITION_INT_DATA {
27034    pub const ENCODED_LEN: usize = 28usize;
27035    pub const DEFAULT: Self = Self {
27036        time_boot_ms: 0_u32,
27037        lat: 0_i32,
27038        lon: 0_i32,
27039        alt: 0_i32,
27040        relative_alt: 0_i32,
27041        vx: 0_i16,
27042        vy: 0_i16,
27043        vz: 0_i16,
27044        hdg: 0_u16,
27045    };
27046    #[cfg(feature = "arbitrary")]
27047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27048        use arbitrary::{Arbitrary, Unstructured};
27049        let mut buf = [0u8; 1024];
27050        rng.fill_bytes(&mut buf);
27051        let mut unstructured = Unstructured::new(&buf);
27052        Self::arbitrary(&mut unstructured).unwrap_or_default()
27053    }
27054}
27055impl Default for GLOBAL_POSITION_INT_DATA {
27056    fn default() -> Self {
27057        Self::DEFAULT.clone()
27058    }
27059}
27060impl MessageData for GLOBAL_POSITION_INT_DATA {
27061    type Message = MavMessage;
27062    const ID: u32 = 33u32;
27063    const NAME: &'static str = "GLOBAL_POSITION_INT";
27064    const EXTRA_CRC: u8 = 104u8;
27065    const ENCODED_LEN: usize = 28usize;
27066    fn deser(
27067        _version: MavlinkVersion,
27068        __input: &[u8],
27069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27070        let avail_len = __input.len();
27071        let mut payload_buf = [0; Self::ENCODED_LEN];
27072        let mut buf = if avail_len < Self::ENCODED_LEN {
27073            payload_buf[0..avail_len].copy_from_slice(__input);
27074            Bytes::new(&payload_buf)
27075        } else {
27076            Bytes::new(__input)
27077        };
27078        let mut __struct = Self::default();
27079        __struct.time_boot_ms = buf.get_u32_le();
27080        __struct.lat = buf.get_i32_le();
27081        __struct.lon = buf.get_i32_le();
27082        __struct.alt = buf.get_i32_le();
27083        __struct.relative_alt = buf.get_i32_le();
27084        __struct.vx = buf.get_i16_le();
27085        __struct.vy = buf.get_i16_le();
27086        __struct.vz = buf.get_i16_le();
27087        __struct.hdg = buf.get_u16_le();
27088        Ok(__struct)
27089    }
27090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27091        let mut __tmp = BytesMut::new(bytes);
27092        #[allow(clippy::absurd_extreme_comparisons)]
27093        #[allow(unused_comparisons)]
27094        if __tmp.remaining() < Self::ENCODED_LEN {
27095            panic!(
27096                "buffer is too small (need {} bytes, but got {})",
27097                Self::ENCODED_LEN,
27098                __tmp.remaining(),
27099            )
27100        }
27101        __tmp.put_u32_le(self.time_boot_ms);
27102        __tmp.put_i32_le(self.lat);
27103        __tmp.put_i32_le(self.lon);
27104        __tmp.put_i32_le(self.alt);
27105        __tmp.put_i32_le(self.relative_alt);
27106        __tmp.put_i16_le(self.vx);
27107        __tmp.put_i16_le(self.vy);
27108        __tmp.put_i16_le(self.vz);
27109        __tmp.put_u16_le(self.hdg);
27110        if matches!(version, MavlinkVersion::V2) {
27111            let len = __tmp.len();
27112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27113        } else {
27114            __tmp.len()
27115        }
27116    }
27117}
27118#[doc = "id: 117"]
27119#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
27120#[derive(Debug, Clone, PartialEq)]
27121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27123pub struct LOG_REQUEST_LIST_DATA {
27124    #[doc = "First log id (0 for first available)"]
27125    pub start: u16,
27126    #[doc = "Last log id (0xffff for last available)"]
27127    pub end: u16,
27128    #[doc = "System ID"]
27129    pub target_system: u8,
27130    #[doc = "Component ID"]
27131    pub target_component: u8,
27132}
27133impl LOG_REQUEST_LIST_DATA {
27134    pub const ENCODED_LEN: usize = 6usize;
27135    pub const DEFAULT: Self = Self {
27136        start: 0_u16,
27137        end: 0_u16,
27138        target_system: 0_u8,
27139        target_component: 0_u8,
27140    };
27141    #[cfg(feature = "arbitrary")]
27142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27143        use arbitrary::{Arbitrary, Unstructured};
27144        let mut buf = [0u8; 1024];
27145        rng.fill_bytes(&mut buf);
27146        let mut unstructured = Unstructured::new(&buf);
27147        Self::arbitrary(&mut unstructured).unwrap_or_default()
27148    }
27149}
27150impl Default for LOG_REQUEST_LIST_DATA {
27151    fn default() -> Self {
27152        Self::DEFAULT.clone()
27153    }
27154}
27155impl MessageData for LOG_REQUEST_LIST_DATA {
27156    type Message = MavMessage;
27157    const ID: u32 = 117u32;
27158    const NAME: &'static str = "LOG_REQUEST_LIST";
27159    const EXTRA_CRC: u8 = 128u8;
27160    const ENCODED_LEN: usize = 6usize;
27161    fn deser(
27162        _version: MavlinkVersion,
27163        __input: &[u8],
27164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27165        let avail_len = __input.len();
27166        let mut payload_buf = [0; Self::ENCODED_LEN];
27167        let mut buf = if avail_len < Self::ENCODED_LEN {
27168            payload_buf[0..avail_len].copy_from_slice(__input);
27169            Bytes::new(&payload_buf)
27170        } else {
27171            Bytes::new(__input)
27172        };
27173        let mut __struct = Self::default();
27174        __struct.start = buf.get_u16_le();
27175        __struct.end = buf.get_u16_le();
27176        __struct.target_system = buf.get_u8();
27177        __struct.target_component = buf.get_u8();
27178        Ok(__struct)
27179    }
27180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27181        let mut __tmp = BytesMut::new(bytes);
27182        #[allow(clippy::absurd_extreme_comparisons)]
27183        #[allow(unused_comparisons)]
27184        if __tmp.remaining() < Self::ENCODED_LEN {
27185            panic!(
27186                "buffer is too small (need {} bytes, but got {})",
27187                Self::ENCODED_LEN,
27188                __tmp.remaining(),
27189            )
27190        }
27191        __tmp.put_u16_le(self.start);
27192        __tmp.put_u16_le(self.end);
27193        __tmp.put_u8(self.target_system);
27194        __tmp.put_u8(self.target_component);
27195        if matches!(version, MavlinkVersion::V2) {
27196            let len = __tmp.len();
27197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27198        } else {
27199            __tmp.len()
27200        }
27201    }
27202}
27203#[doc = "id: 91"]
27204#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
27205#[derive(Debug, Clone, PartialEq)]
27206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27208pub struct HIL_CONTROLS_DATA {
27209    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27210    pub time_usec: u64,
27211    #[doc = "Control output -1 .. 1"]
27212    pub roll_ailerons: f32,
27213    #[doc = "Control output -1 .. 1"]
27214    pub pitch_elevator: f32,
27215    #[doc = "Control output -1 .. 1"]
27216    pub yaw_rudder: f32,
27217    #[doc = "Throttle 0 .. 1"]
27218    pub throttle: f32,
27219    #[doc = "Aux 1, -1 .. 1"]
27220    pub aux1: f32,
27221    #[doc = "Aux 2, -1 .. 1"]
27222    pub aux2: f32,
27223    #[doc = "Aux 3, -1 .. 1"]
27224    pub aux3: f32,
27225    #[doc = "Aux 4, -1 .. 1"]
27226    pub aux4: f32,
27227    #[doc = "System mode."]
27228    pub mode: MavMode,
27229    #[doc = "Navigation mode (MAV_NAV_MODE)"]
27230    pub nav_mode: u8,
27231}
27232impl HIL_CONTROLS_DATA {
27233    pub const ENCODED_LEN: usize = 42usize;
27234    pub const DEFAULT: Self = Self {
27235        time_usec: 0_u64,
27236        roll_ailerons: 0.0_f32,
27237        pitch_elevator: 0.0_f32,
27238        yaw_rudder: 0.0_f32,
27239        throttle: 0.0_f32,
27240        aux1: 0.0_f32,
27241        aux2: 0.0_f32,
27242        aux3: 0.0_f32,
27243        aux4: 0.0_f32,
27244        mode: MavMode::DEFAULT,
27245        nav_mode: 0_u8,
27246    };
27247    #[cfg(feature = "arbitrary")]
27248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27249        use arbitrary::{Arbitrary, Unstructured};
27250        let mut buf = [0u8; 1024];
27251        rng.fill_bytes(&mut buf);
27252        let mut unstructured = Unstructured::new(&buf);
27253        Self::arbitrary(&mut unstructured).unwrap_or_default()
27254    }
27255}
27256impl Default for HIL_CONTROLS_DATA {
27257    fn default() -> Self {
27258        Self::DEFAULT.clone()
27259    }
27260}
27261impl MessageData for HIL_CONTROLS_DATA {
27262    type Message = MavMessage;
27263    const ID: u32 = 91u32;
27264    const NAME: &'static str = "HIL_CONTROLS";
27265    const EXTRA_CRC: u8 = 63u8;
27266    const ENCODED_LEN: usize = 42usize;
27267    fn deser(
27268        _version: MavlinkVersion,
27269        __input: &[u8],
27270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27271        let avail_len = __input.len();
27272        let mut payload_buf = [0; Self::ENCODED_LEN];
27273        let mut buf = if avail_len < Self::ENCODED_LEN {
27274            payload_buf[0..avail_len].copy_from_slice(__input);
27275            Bytes::new(&payload_buf)
27276        } else {
27277            Bytes::new(__input)
27278        };
27279        let mut __struct = Self::default();
27280        __struct.time_usec = buf.get_u64_le();
27281        __struct.roll_ailerons = buf.get_f32_le();
27282        __struct.pitch_elevator = buf.get_f32_le();
27283        __struct.yaw_rudder = buf.get_f32_le();
27284        __struct.throttle = buf.get_f32_le();
27285        __struct.aux1 = buf.get_f32_le();
27286        __struct.aux2 = buf.get_f32_le();
27287        __struct.aux3 = buf.get_f32_le();
27288        __struct.aux4 = buf.get_f32_le();
27289        let tmp = buf.get_u8();
27290        __struct.mode =
27291            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27292                enum_type: "MavMode",
27293                value: tmp as u32,
27294            })?;
27295        __struct.nav_mode = buf.get_u8();
27296        Ok(__struct)
27297    }
27298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27299        let mut __tmp = BytesMut::new(bytes);
27300        #[allow(clippy::absurd_extreme_comparisons)]
27301        #[allow(unused_comparisons)]
27302        if __tmp.remaining() < Self::ENCODED_LEN {
27303            panic!(
27304                "buffer is too small (need {} bytes, but got {})",
27305                Self::ENCODED_LEN,
27306                __tmp.remaining(),
27307            )
27308        }
27309        __tmp.put_u64_le(self.time_usec);
27310        __tmp.put_f32_le(self.roll_ailerons);
27311        __tmp.put_f32_le(self.pitch_elevator);
27312        __tmp.put_f32_le(self.yaw_rudder);
27313        __tmp.put_f32_le(self.throttle);
27314        __tmp.put_f32_le(self.aux1);
27315        __tmp.put_f32_le(self.aux2);
27316        __tmp.put_f32_le(self.aux3);
27317        __tmp.put_f32_le(self.aux4);
27318        __tmp.put_u8(self.mode as u8);
27319        __tmp.put_u8(self.nav_mode);
27320        if matches!(version, MavlinkVersion::V2) {
27321            let len = __tmp.len();
27322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27323        } else {
27324            __tmp.len()
27325        }
27326    }
27327}
27328#[doc = "id: 370"]
27329#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
27330#[derive(Debug, Clone, PartialEq)]
27331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27333pub struct SMART_BATTERY_INFO_DATA {
27334    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
27335    pub capacity_full_specification: i32,
27336    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
27337    pub capacity_full: i32,
27338    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
27339    pub cycle_count: u16,
27340    #[doc = "Battery weight. 0: field not provided."]
27341    pub weight: u16,
27342    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
27343    pub discharge_minimum_voltage: u16,
27344    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
27345    pub charging_minimum_voltage: u16,
27346    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
27347    pub resting_minimum_voltage: u16,
27348    #[doc = "Battery ID"]
27349    pub id: u8,
27350    #[doc = "Function of the battery"]
27351    pub battery_function: MavBatteryFunction,
27352    #[doc = "Type (chemistry) of the battery"]
27353    pub mavtype: MavBatteryType,
27354    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27356    pub serial_number: [u8; 16],
27357    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
27358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27359    pub device_name: [u8; 50],
27360    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27362    pub charging_maximum_voltage: u16,
27363    #[doc = "Number of battery cells in series. 0: field not provided."]
27364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27365    pub cells_in_series: u8,
27366    #[doc = "Maximum pack discharge current. 0: field not provided."]
27367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27368    pub discharge_maximum_current: u32,
27369    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27371    pub discharge_maximum_burst_current: u32,
27372    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27375    pub manufacture_date: [u8; 11],
27376}
27377impl SMART_BATTERY_INFO_DATA {
27378    pub const ENCODED_LEN: usize = 109usize;
27379    pub const DEFAULT: Self = Self {
27380        capacity_full_specification: 0_i32,
27381        capacity_full: 0_i32,
27382        cycle_count: 0_u16,
27383        weight: 0_u16,
27384        discharge_minimum_voltage: 0_u16,
27385        charging_minimum_voltage: 0_u16,
27386        resting_minimum_voltage: 0_u16,
27387        id: 0_u8,
27388        battery_function: MavBatteryFunction::DEFAULT,
27389        mavtype: MavBatteryType::DEFAULT,
27390        serial_number: [0_u8; 16usize],
27391        device_name: [0_u8; 50usize],
27392        charging_maximum_voltage: 0_u16,
27393        cells_in_series: 0_u8,
27394        discharge_maximum_current: 0_u32,
27395        discharge_maximum_burst_current: 0_u32,
27396        manufacture_date: [0_u8; 11usize],
27397    };
27398    #[cfg(feature = "arbitrary")]
27399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27400        use arbitrary::{Arbitrary, Unstructured};
27401        let mut buf = [0u8; 1024];
27402        rng.fill_bytes(&mut buf);
27403        let mut unstructured = Unstructured::new(&buf);
27404        Self::arbitrary(&mut unstructured).unwrap_or_default()
27405    }
27406}
27407impl Default for SMART_BATTERY_INFO_DATA {
27408    fn default() -> Self {
27409        Self::DEFAULT.clone()
27410    }
27411}
27412impl MessageData for SMART_BATTERY_INFO_DATA {
27413    type Message = MavMessage;
27414    const ID: u32 = 370u32;
27415    const NAME: &'static str = "SMART_BATTERY_INFO";
27416    const EXTRA_CRC: u8 = 75u8;
27417    const ENCODED_LEN: usize = 109usize;
27418    fn deser(
27419        _version: MavlinkVersion,
27420        __input: &[u8],
27421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27422        let avail_len = __input.len();
27423        let mut payload_buf = [0; Self::ENCODED_LEN];
27424        let mut buf = if avail_len < Self::ENCODED_LEN {
27425            payload_buf[0..avail_len].copy_from_slice(__input);
27426            Bytes::new(&payload_buf)
27427        } else {
27428            Bytes::new(__input)
27429        };
27430        let mut __struct = Self::default();
27431        __struct.capacity_full_specification = buf.get_i32_le();
27432        __struct.capacity_full = buf.get_i32_le();
27433        __struct.cycle_count = buf.get_u16_le();
27434        __struct.weight = buf.get_u16_le();
27435        __struct.discharge_minimum_voltage = buf.get_u16_le();
27436        __struct.charging_minimum_voltage = buf.get_u16_le();
27437        __struct.resting_minimum_voltage = buf.get_u16_le();
27438        __struct.id = buf.get_u8();
27439        let tmp = buf.get_u8();
27440        __struct.battery_function =
27441            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27442                enum_type: "MavBatteryFunction",
27443                value: tmp as u32,
27444            })?;
27445        let tmp = buf.get_u8();
27446        __struct.mavtype =
27447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27448                enum_type: "MavBatteryType",
27449                value: tmp as u32,
27450            })?;
27451        for v in &mut __struct.serial_number {
27452            let val = buf.get_u8();
27453            *v = val;
27454        }
27455        for v in &mut __struct.device_name {
27456            let val = buf.get_u8();
27457            *v = val;
27458        }
27459        __struct.charging_maximum_voltage = buf.get_u16_le();
27460        __struct.cells_in_series = buf.get_u8();
27461        __struct.discharge_maximum_current = buf.get_u32_le();
27462        __struct.discharge_maximum_burst_current = buf.get_u32_le();
27463        for v in &mut __struct.manufacture_date {
27464            let val = buf.get_u8();
27465            *v = val;
27466        }
27467        Ok(__struct)
27468    }
27469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27470        let mut __tmp = BytesMut::new(bytes);
27471        #[allow(clippy::absurd_extreme_comparisons)]
27472        #[allow(unused_comparisons)]
27473        if __tmp.remaining() < Self::ENCODED_LEN {
27474            panic!(
27475                "buffer is too small (need {} bytes, but got {})",
27476                Self::ENCODED_LEN,
27477                __tmp.remaining(),
27478            )
27479        }
27480        __tmp.put_i32_le(self.capacity_full_specification);
27481        __tmp.put_i32_le(self.capacity_full);
27482        __tmp.put_u16_le(self.cycle_count);
27483        __tmp.put_u16_le(self.weight);
27484        __tmp.put_u16_le(self.discharge_minimum_voltage);
27485        __tmp.put_u16_le(self.charging_minimum_voltage);
27486        __tmp.put_u16_le(self.resting_minimum_voltage);
27487        __tmp.put_u8(self.id);
27488        __tmp.put_u8(self.battery_function as u8);
27489        __tmp.put_u8(self.mavtype as u8);
27490        for val in &self.serial_number {
27491            __tmp.put_u8(*val);
27492        }
27493        for val in &self.device_name {
27494            __tmp.put_u8(*val);
27495        }
27496        __tmp.put_u16_le(self.charging_maximum_voltage);
27497        __tmp.put_u8(self.cells_in_series);
27498        __tmp.put_u32_le(self.discharge_maximum_current);
27499        __tmp.put_u32_le(self.discharge_maximum_burst_current);
27500        for val in &self.manufacture_date {
27501            __tmp.put_u8(*val);
27502        }
27503        if matches!(version, MavlinkVersion::V2) {
27504            let len = __tmp.len();
27505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27506        } else {
27507            __tmp.len()
27508        }
27509    }
27510}
27511#[doc = "id: 291"]
27512#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
27513#[derive(Debug, Clone, PartialEq)]
27514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27516pub struct ESC_STATUS_DATA {
27517    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
27518    pub time_usec: u64,
27519    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
27520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27521    pub rpm: [i32; 4],
27522    #[doc = "Voltage measured from each ESC."]
27523    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27524    pub voltage: [f32; 4],
27525    #[doc = "Current measured from each ESC."]
27526    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27527    pub current: [f32; 4],
27528    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
27529    pub index: u8,
27530}
27531impl ESC_STATUS_DATA {
27532    pub const ENCODED_LEN: usize = 57usize;
27533    pub const DEFAULT: Self = Self {
27534        time_usec: 0_u64,
27535        rpm: [0_i32; 4usize],
27536        voltage: [0.0_f32; 4usize],
27537        current: [0.0_f32; 4usize],
27538        index: 0_u8,
27539    };
27540    #[cfg(feature = "arbitrary")]
27541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27542        use arbitrary::{Arbitrary, Unstructured};
27543        let mut buf = [0u8; 1024];
27544        rng.fill_bytes(&mut buf);
27545        let mut unstructured = Unstructured::new(&buf);
27546        Self::arbitrary(&mut unstructured).unwrap_or_default()
27547    }
27548}
27549impl Default for ESC_STATUS_DATA {
27550    fn default() -> Self {
27551        Self::DEFAULT.clone()
27552    }
27553}
27554impl MessageData for ESC_STATUS_DATA {
27555    type Message = MavMessage;
27556    const ID: u32 = 291u32;
27557    const NAME: &'static str = "ESC_STATUS";
27558    const EXTRA_CRC: u8 = 10u8;
27559    const ENCODED_LEN: usize = 57usize;
27560    fn deser(
27561        _version: MavlinkVersion,
27562        __input: &[u8],
27563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27564        let avail_len = __input.len();
27565        let mut payload_buf = [0; Self::ENCODED_LEN];
27566        let mut buf = if avail_len < Self::ENCODED_LEN {
27567            payload_buf[0..avail_len].copy_from_slice(__input);
27568            Bytes::new(&payload_buf)
27569        } else {
27570            Bytes::new(__input)
27571        };
27572        let mut __struct = Self::default();
27573        __struct.time_usec = buf.get_u64_le();
27574        for v in &mut __struct.rpm {
27575            let val = buf.get_i32_le();
27576            *v = val;
27577        }
27578        for v in &mut __struct.voltage {
27579            let val = buf.get_f32_le();
27580            *v = val;
27581        }
27582        for v in &mut __struct.current {
27583            let val = buf.get_f32_le();
27584            *v = val;
27585        }
27586        __struct.index = buf.get_u8();
27587        Ok(__struct)
27588    }
27589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27590        let mut __tmp = BytesMut::new(bytes);
27591        #[allow(clippy::absurd_extreme_comparisons)]
27592        #[allow(unused_comparisons)]
27593        if __tmp.remaining() < Self::ENCODED_LEN {
27594            panic!(
27595                "buffer is too small (need {} bytes, but got {})",
27596                Self::ENCODED_LEN,
27597                __tmp.remaining(),
27598            )
27599        }
27600        __tmp.put_u64_le(self.time_usec);
27601        for val in &self.rpm {
27602            __tmp.put_i32_le(*val);
27603        }
27604        for val in &self.voltage {
27605            __tmp.put_f32_le(*val);
27606        }
27607        for val in &self.current {
27608            __tmp.put_f32_le(*val);
27609        }
27610        __tmp.put_u8(self.index);
27611        if matches!(version, MavlinkVersion::V2) {
27612            let len = __tmp.len();
27613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27614        } else {
27615            __tmp.len()
27616        }
27617    }
27618}
27619#[doc = "id: 386"]
27620#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
27621#[derive(Debug, Clone, PartialEq)]
27622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27624pub struct CAN_FRAME_DATA {
27625    #[doc = "Frame ID"]
27626    pub id: u32,
27627    #[doc = "System ID."]
27628    pub target_system: u8,
27629    #[doc = "Component ID."]
27630    pub target_component: u8,
27631    #[doc = "Bus number"]
27632    pub bus: u8,
27633    #[doc = "Frame length"]
27634    pub len: u8,
27635    #[doc = "Frame data"]
27636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27637    pub data: [u8; 8],
27638}
27639impl CAN_FRAME_DATA {
27640    pub const ENCODED_LEN: usize = 16usize;
27641    pub const DEFAULT: Self = Self {
27642        id: 0_u32,
27643        target_system: 0_u8,
27644        target_component: 0_u8,
27645        bus: 0_u8,
27646        len: 0_u8,
27647        data: [0_u8; 8usize],
27648    };
27649    #[cfg(feature = "arbitrary")]
27650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27651        use arbitrary::{Arbitrary, Unstructured};
27652        let mut buf = [0u8; 1024];
27653        rng.fill_bytes(&mut buf);
27654        let mut unstructured = Unstructured::new(&buf);
27655        Self::arbitrary(&mut unstructured).unwrap_or_default()
27656    }
27657}
27658impl Default for CAN_FRAME_DATA {
27659    fn default() -> Self {
27660        Self::DEFAULT.clone()
27661    }
27662}
27663impl MessageData for CAN_FRAME_DATA {
27664    type Message = MavMessage;
27665    const ID: u32 = 386u32;
27666    const NAME: &'static str = "CAN_FRAME";
27667    const EXTRA_CRC: u8 = 132u8;
27668    const ENCODED_LEN: usize = 16usize;
27669    fn deser(
27670        _version: MavlinkVersion,
27671        __input: &[u8],
27672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27673        let avail_len = __input.len();
27674        let mut payload_buf = [0; Self::ENCODED_LEN];
27675        let mut buf = if avail_len < Self::ENCODED_LEN {
27676            payload_buf[0..avail_len].copy_from_slice(__input);
27677            Bytes::new(&payload_buf)
27678        } else {
27679            Bytes::new(__input)
27680        };
27681        let mut __struct = Self::default();
27682        __struct.id = buf.get_u32_le();
27683        __struct.target_system = buf.get_u8();
27684        __struct.target_component = buf.get_u8();
27685        __struct.bus = buf.get_u8();
27686        __struct.len = buf.get_u8();
27687        for v in &mut __struct.data {
27688            let val = buf.get_u8();
27689            *v = val;
27690        }
27691        Ok(__struct)
27692    }
27693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27694        let mut __tmp = BytesMut::new(bytes);
27695        #[allow(clippy::absurd_extreme_comparisons)]
27696        #[allow(unused_comparisons)]
27697        if __tmp.remaining() < Self::ENCODED_LEN {
27698            panic!(
27699                "buffer is too small (need {} bytes, but got {})",
27700                Self::ENCODED_LEN,
27701                __tmp.remaining(),
27702            )
27703        }
27704        __tmp.put_u32_le(self.id);
27705        __tmp.put_u8(self.target_system);
27706        __tmp.put_u8(self.target_component);
27707        __tmp.put_u8(self.bus);
27708        __tmp.put_u8(self.len);
27709        for val in &self.data {
27710            __tmp.put_u8(*val);
27711        }
27712        if matches!(version, MavlinkVersion::V2) {
27713            let len = __tmp.len();
27714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27715        } else {
27716            __tmp.len()
27717        }
27718    }
27719}
27720#[doc = "id: 276"]
27721#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
27722#[derive(Debug, Clone, PartialEq)]
27723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27725pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
27726    #[doc = "Latitude of tracked object"]
27727    pub lat: i32,
27728    #[doc = "Longitude of tracked object"]
27729    pub lon: i32,
27730    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
27731    pub alt: f32,
27732    #[doc = "Horizontal accuracy. NAN if unknown"]
27733    pub h_acc: f32,
27734    #[doc = "Vertical accuracy. NAN if unknown"]
27735    pub v_acc: f32,
27736    #[doc = "North velocity of tracked object. NAN if unknown"]
27737    pub vel_n: f32,
27738    #[doc = "East velocity of tracked object. NAN if unknown"]
27739    pub vel_e: f32,
27740    #[doc = "Down velocity of tracked object. NAN if unknown"]
27741    pub vel_d: f32,
27742    #[doc = "Velocity accuracy. NAN if unknown"]
27743    pub vel_acc: f32,
27744    #[doc = "Distance between camera and tracked object. NAN if unknown"]
27745    pub dist: f32,
27746    #[doc = "Heading in radians, in NED. NAN if unknown"]
27747    pub hdg: f32,
27748    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
27749    pub hdg_acc: f32,
27750    #[doc = "Current tracking status"]
27751    pub tracking_status: CameraTrackingStatusFlags,
27752    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
27753    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27754    pub camera_device_id: u8,
27755}
27756impl CAMERA_TRACKING_GEO_STATUS_DATA {
27757    pub const ENCODED_LEN: usize = 50usize;
27758    pub const DEFAULT: Self = Self {
27759        lat: 0_i32,
27760        lon: 0_i32,
27761        alt: 0.0_f32,
27762        h_acc: 0.0_f32,
27763        v_acc: 0.0_f32,
27764        vel_n: 0.0_f32,
27765        vel_e: 0.0_f32,
27766        vel_d: 0.0_f32,
27767        vel_acc: 0.0_f32,
27768        dist: 0.0_f32,
27769        hdg: 0.0_f32,
27770        hdg_acc: 0.0_f32,
27771        tracking_status: CameraTrackingStatusFlags::DEFAULT,
27772        camera_device_id: 0_u8,
27773    };
27774    #[cfg(feature = "arbitrary")]
27775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27776        use arbitrary::{Arbitrary, Unstructured};
27777        let mut buf = [0u8; 1024];
27778        rng.fill_bytes(&mut buf);
27779        let mut unstructured = Unstructured::new(&buf);
27780        Self::arbitrary(&mut unstructured).unwrap_or_default()
27781    }
27782}
27783impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
27784    fn default() -> Self {
27785        Self::DEFAULT.clone()
27786    }
27787}
27788impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
27789    type Message = MavMessage;
27790    const ID: u32 = 276u32;
27791    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
27792    const EXTRA_CRC: u8 = 18u8;
27793    const ENCODED_LEN: usize = 50usize;
27794    fn deser(
27795        _version: MavlinkVersion,
27796        __input: &[u8],
27797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27798        let avail_len = __input.len();
27799        let mut payload_buf = [0; Self::ENCODED_LEN];
27800        let mut buf = if avail_len < Self::ENCODED_LEN {
27801            payload_buf[0..avail_len].copy_from_slice(__input);
27802            Bytes::new(&payload_buf)
27803        } else {
27804            Bytes::new(__input)
27805        };
27806        let mut __struct = Self::default();
27807        __struct.lat = buf.get_i32_le();
27808        __struct.lon = buf.get_i32_le();
27809        __struct.alt = buf.get_f32_le();
27810        __struct.h_acc = buf.get_f32_le();
27811        __struct.v_acc = buf.get_f32_le();
27812        __struct.vel_n = buf.get_f32_le();
27813        __struct.vel_e = buf.get_f32_le();
27814        __struct.vel_d = buf.get_f32_le();
27815        __struct.vel_acc = buf.get_f32_le();
27816        __struct.dist = buf.get_f32_le();
27817        __struct.hdg = buf.get_f32_le();
27818        __struct.hdg_acc = buf.get_f32_le();
27819        let tmp = buf.get_u8();
27820        __struct.tracking_status =
27821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27822                enum_type: "CameraTrackingStatusFlags",
27823                value: tmp as u32,
27824            })?;
27825        __struct.camera_device_id = buf.get_u8();
27826        Ok(__struct)
27827    }
27828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27829        let mut __tmp = BytesMut::new(bytes);
27830        #[allow(clippy::absurd_extreme_comparisons)]
27831        #[allow(unused_comparisons)]
27832        if __tmp.remaining() < Self::ENCODED_LEN {
27833            panic!(
27834                "buffer is too small (need {} bytes, but got {})",
27835                Self::ENCODED_LEN,
27836                __tmp.remaining(),
27837            )
27838        }
27839        __tmp.put_i32_le(self.lat);
27840        __tmp.put_i32_le(self.lon);
27841        __tmp.put_f32_le(self.alt);
27842        __tmp.put_f32_le(self.h_acc);
27843        __tmp.put_f32_le(self.v_acc);
27844        __tmp.put_f32_le(self.vel_n);
27845        __tmp.put_f32_le(self.vel_e);
27846        __tmp.put_f32_le(self.vel_d);
27847        __tmp.put_f32_le(self.vel_acc);
27848        __tmp.put_f32_le(self.dist);
27849        __tmp.put_f32_le(self.hdg);
27850        __tmp.put_f32_le(self.hdg_acc);
27851        __tmp.put_u8(self.tracking_status as u8);
27852        __tmp.put_u8(self.camera_device_id);
27853        if matches!(version, MavlinkVersion::V2) {
27854            let len = __tmp.len();
27855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27856        } else {
27857            __tmp.len()
27858        }
27859    }
27860}
27861#[doc = "id: 39"]
27862#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
27863#[derive(Debug, Clone, PartialEq)]
27864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27866pub struct MISSION_ITEM_DATA {
27867    #[doc = "PARAM1, see MAV_CMD enum"]
27868    pub param1: f32,
27869    #[doc = "PARAM2, see MAV_CMD enum"]
27870    pub param2: f32,
27871    #[doc = "PARAM3, see MAV_CMD enum"]
27872    pub param3: f32,
27873    #[doc = "PARAM4, see MAV_CMD enum"]
27874    pub param4: f32,
27875    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
27876    pub x: f32,
27877    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
27878    pub y: f32,
27879    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
27880    pub z: f32,
27881    #[doc = "Sequence"]
27882    pub seq: u16,
27883    #[doc = "The scheduled action for the waypoint."]
27884    pub command: MavCmd,
27885    #[doc = "System ID"]
27886    pub target_system: u8,
27887    #[doc = "Component ID"]
27888    pub target_component: u8,
27889    #[doc = "The coordinate system of the waypoint."]
27890    pub frame: MavFrame,
27891    #[doc = "false:0, true:1"]
27892    pub current: u8,
27893    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
27894    pub autocontinue: u8,
27895    #[doc = "Mission type."]
27896    #[cfg_attr(feature = "serde", serde(default))]
27897    pub mission_type: MavMissionType,
27898}
27899impl MISSION_ITEM_DATA {
27900    pub const ENCODED_LEN: usize = 38usize;
27901    pub const DEFAULT: Self = Self {
27902        param1: 0.0_f32,
27903        param2: 0.0_f32,
27904        param3: 0.0_f32,
27905        param4: 0.0_f32,
27906        x: 0.0_f32,
27907        y: 0.0_f32,
27908        z: 0.0_f32,
27909        seq: 0_u16,
27910        command: MavCmd::DEFAULT,
27911        target_system: 0_u8,
27912        target_component: 0_u8,
27913        frame: MavFrame::DEFAULT,
27914        current: 0_u8,
27915        autocontinue: 0_u8,
27916        mission_type: MavMissionType::DEFAULT,
27917    };
27918    #[cfg(feature = "arbitrary")]
27919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27920        use arbitrary::{Arbitrary, Unstructured};
27921        let mut buf = [0u8; 1024];
27922        rng.fill_bytes(&mut buf);
27923        let mut unstructured = Unstructured::new(&buf);
27924        Self::arbitrary(&mut unstructured).unwrap_or_default()
27925    }
27926}
27927impl Default for MISSION_ITEM_DATA {
27928    fn default() -> Self {
27929        Self::DEFAULT.clone()
27930    }
27931}
27932impl MessageData for MISSION_ITEM_DATA {
27933    type Message = MavMessage;
27934    const ID: u32 = 39u32;
27935    const NAME: &'static str = "MISSION_ITEM";
27936    const EXTRA_CRC: u8 = 254u8;
27937    const ENCODED_LEN: usize = 38usize;
27938    fn deser(
27939        _version: MavlinkVersion,
27940        __input: &[u8],
27941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27942        let avail_len = __input.len();
27943        let mut payload_buf = [0; Self::ENCODED_LEN];
27944        let mut buf = if avail_len < Self::ENCODED_LEN {
27945            payload_buf[0..avail_len].copy_from_slice(__input);
27946            Bytes::new(&payload_buf)
27947        } else {
27948            Bytes::new(__input)
27949        };
27950        let mut __struct = Self::default();
27951        __struct.param1 = buf.get_f32_le();
27952        __struct.param2 = buf.get_f32_le();
27953        __struct.param3 = buf.get_f32_le();
27954        __struct.param4 = buf.get_f32_le();
27955        __struct.x = buf.get_f32_le();
27956        __struct.y = buf.get_f32_le();
27957        __struct.z = buf.get_f32_le();
27958        __struct.seq = buf.get_u16_le();
27959        let tmp = buf.get_u16_le();
27960        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
27961            ::mavlink_core::error::ParserError::InvalidEnum {
27962                enum_type: "MavCmd",
27963                value: tmp as u32,
27964            },
27965        )?;
27966        __struct.target_system = buf.get_u8();
27967        __struct.target_component = buf.get_u8();
27968        let tmp = buf.get_u8();
27969        __struct.frame =
27970            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27971                enum_type: "MavFrame",
27972                value: tmp as u32,
27973            })?;
27974        __struct.current = buf.get_u8();
27975        __struct.autocontinue = buf.get_u8();
27976        let tmp = buf.get_u8();
27977        __struct.mission_type =
27978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27979                enum_type: "MavMissionType",
27980                value: tmp as u32,
27981            })?;
27982        Ok(__struct)
27983    }
27984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27985        let mut __tmp = BytesMut::new(bytes);
27986        #[allow(clippy::absurd_extreme_comparisons)]
27987        #[allow(unused_comparisons)]
27988        if __tmp.remaining() < Self::ENCODED_LEN {
27989            panic!(
27990                "buffer is too small (need {} bytes, but got {})",
27991                Self::ENCODED_LEN,
27992                __tmp.remaining(),
27993            )
27994        }
27995        __tmp.put_f32_le(self.param1);
27996        __tmp.put_f32_le(self.param2);
27997        __tmp.put_f32_le(self.param3);
27998        __tmp.put_f32_le(self.param4);
27999        __tmp.put_f32_le(self.x);
28000        __tmp.put_f32_le(self.y);
28001        __tmp.put_f32_le(self.z);
28002        __tmp.put_u16_le(self.seq);
28003        __tmp.put_u16_le(self.command as u16);
28004        __tmp.put_u8(self.target_system);
28005        __tmp.put_u8(self.target_component);
28006        __tmp.put_u8(self.frame as u8);
28007        __tmp.put_u8(self.current);
28008        __tmp.put_u8(self.autocontinue);
28009        __tmp.put_u8(self.mission_type as u8);
28010        if matches!(version, MavlinkVersion::V2) {
28011            let len = __tmp.len();
28012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28013        } else {
28014            __tmp.len()
28015        }
28016    }
28017}
28018#[doc = "id: 12900"]
28019#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
28020#[derive(Debug, Clone, PartialEq)]
28021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28023pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
28024    #[doc = "System ID (0 for broadcast)."]
28025    pub target_system: u8,
28026    #[doc = "Component ID (0 for broadcast)."]
28027    pub target_component: u8,
28028    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
28029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28030    pub id_or_mac: [u8; 20],
28031    #[doc = "Indicates the format for the uas_id field of this message."]
28032    pub id_type: MavOdidIdType,
28033    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
28034    pub ua_type: MavOdidUaType,
28035    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
28036    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28037    pub uas_id: [u8; 20],
28038}
28039impl OPEN_DRONE_ID_BASIC_ID_DATA {
28040    pub const ENCODED_LEN: usize = 44usize;
28041    pub const DEFAULT: Self = Self {
28042        target_system: 0_u8,
28043        target_component: 0_u8,
28044        id_or_mac: [0_u8; 20usize],
28045        id_type: MavOdidIdType::DEFAULT,
28046        ua_type: MavOdidUaType::DEFAULT,
28047        uas_id: [0_u8; 20usize],
28048    };
28049    #[cfg(feature = "arbitrary")]
28050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28051        use arbitrary::{Arbitrary, Unstructured};
28052        let mut buf = [0u8; 1024];
28053        rng.fill_bytes(&mut buf);
28054        let mut unstructured = Unstructured::new(&buf);
28055        Self::arbitrary(&mut unstructured).unwrap_or_default()
28056    }
28057}
28058impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
28059    fn default() -> Self {
28060        Self::DEFAULT.clone()
28061    }
28062}
28063impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
28064    type Message = MavMessage;
28065    const ID: u32 = 12900u32;
28066    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
28067    const EXTRA_CRC: u8 = 114u8;
28068    const ENCODED_LEN: usize = 44usize;
28069    fn deser(
28070        _version: MavlinkVersion,
28071        __input: &[u8],
28072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28073        let avail_len = __input.len();
28074        let mut payload_buf = [0; Self::ENCODED_LEN];
28075        let mut buf = if avail_len < Self::ENCODED_LEN {
28076            payload_buf[0..avail_len].copy_from_slice(__input);
28077            Bytes::new(&payload_buf)
28078        } else {
28079            Bytes::new(__input)
28080        };
28081        let mut __struct = Self::default();
28082        __struct.target_system = buf.get_u8();
28083        __struct.target_component = buf.get_u8();
28084        for v in &mut __struct.id_or_mac {
28085            let val = buf.get_u8();
28086            *v = val;
28087        }
28088        let tmp = buf.get_u8();
28089        __struct.id_type =
28090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28091                enum_type: "MavOdidIdType",
28092                value: tmp as u32,
28093            })?;
28094        let tmp = buf.get_u8();
28095        __struct.ua_type =
28096            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28097                enum_type: "MavOdidUaType",
28098                value: tmp as u32,
28099            })?;
28100        for v in &mut __struct.uas_id {
28101            let val = buf.get_u8();
28102            *v = val;
28103        }
28104        Ok(__struct)
28105    }
28106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28107        let mut __tmp = BytesMut::new(bytes);
28108        #[allow(clippy::absurd_extreme_comparisons)]
28109        #[allow(unused_comparisons)]
28110        if __tmp.remaining() < Self::ENCODED_LEN {
28111            panic!(
28112                "buffer is too small (need {} bytes, but got {})",
28113                Self::ENCODED_LEN,
28114                __tmp.remaining(),
28115            )
28116        }
28117        __tmp.put_u8(self.target_system);
28118        __tmp.put_u8(self.target_component);
28119        for val in &self.id_or_mac {
28120            __tmp.put_u8(*val);
28121        }
28122        __tmp.put_u8(self.id_type as u8);
28123        __tmp.put_u8(self.ua_type as u8);
28124        for val in &self.uas_id {
28125            __tmp.put_u8(*val);
28126        }
28127        if matches!(version, MavlinkVersion::V2) {
28128            let len = __tmp.len();
28129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28130        } else {
28131            __tmp.len()
28132        }
28133    }
28134}
28135#[doc = "id: 234"]
28136#[doc = "Message appropriate for high latency connections like Iridium."]
28137#[derive(Debug, Clone, PartialEq)]
28138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28140pub struct HIGH_LATENCY_DATA {
28141    #[doc = "A bitfield for use for autopilot-specific flags."]
28142    pub custom_mode: u32,
28143    #[doc = "Latitude"]
28144    pub latitude: i32,
28145    #[doc = "Longitude"]
28146    pub longitude: i32,
28147    #[doc = "roll"]
28148    pub roll: i16,
28149    #[doc = "pitch"]
28150    pub pitch: i16,
28151    #[doc = "heading"]
28152    pub heading: u16,
28153    #[doc = "heading setpoint"]
28154    pub heading_sp: i16,
28155    #[doc = "Altitude above mean sea level"]
28156    pub altitude_amsl: i16,
28157    #[doc = "Altitude setpoint relative to the home position"]
28158    pub altitude_sp: i16,
28159    #[doc = "distance to target"]
28160    pub wp_distance: u16,
28161    #[doc = "Bitmap of enabled system modes."]
28162    pub base_mode: MavModeFlag,
28163    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
28164    pub landed_state: MavLandedState,
28165    #[doc = "throttle (percentage)"]
28166    pub throttle: i8,
28167    #[doc = "airspeed"]
28168    pub airspeed: u8,
28169    #[doc = "airspeed setpoint"]
28170    pub airspeed_sp: u8,
28171    #[doc = "groundspeed"]
28172    pub groundspeed: u8,
28173    #[doc = "climb rate"]
28174    pub climb_rate: i8,
28175    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
28176    pub gps_nsat: u8,
28177    #[doc = "GPS Fix type."]
28178    pub gps_fix_type: GpsFixType,
28179    #[doc = "Remaining battery (percentage)"]
28180    pub battery_remaining: u8,
28181    #[doc = "Autopilot temperature (degrees C)"]
28182    pub temperature: i8,
28183    #[doc = "Air temperature (degrees C) from airspeed sensor"]
28184    pub temperature_air: i8,
28185    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
28186    pub failsafe: u8,
28187    #[doc = "current waypoint number"]
28188    pub wp_num: u8,
28189}
28190impl HIGH_LATENCY_DATA {
28191    pub const ENCODED_LEN: usize = 40usize;
28192    pub const DEFAULT: Self = Self {
28193        custom_mode: 0_u32,
28194        latitude: 0_i32,
28195        longitude: 0_i32,
28196        roll: 0_i16,
28197        pitch: 0_i16,
28198        heading: 0_u16,
28199        heading_sp: 0_i16,
28200        altitude_amsl: 0_i16,
28201        altitude_sp: 0_i16,
28202        wp_distance: 0_u16,
28203        base_mode: MavModeFlag::DEFAULT,
28204        landed_state: MavLandedState::DEFAULT,
28205        throttle: 0_i8,
28206        airspeed: 0_u8,
28207        airspeed_sp: 0_u8,
28208        groundspeed: 0_u8,
28209        climb_rate: 0_i8,
28210        gps_nsat: 0_u8,
28211        gps_fix_type: GpsFixType::DEFAULT,
28212        battery_remaining: 0_u8,
28213        temperature: 0_i8,
28214        temperature_air: 0_i8,
28215        failsafe: 0_u8,
28216        wp_num: 0_u8,
28217    };
28218    #[cfg(feature = "arbitrary")]
28219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28220        use arbitrary::{Arbitrary, Unstructured};
28221        let mut buf = [0u8; 1024];
28222        rng.fill_bytes(&mut buf);
28223        let mut unstructured = Unstructured::new(&buf);
28224        Self::arbitrary(&mut unstructured).unwrap_or_default()
28225    }
28226}
28227impl Default for HIGH_LATENCY_DATA {
28228    fn default() -> Self {
28229        Self::DEFAULT.clone()
28230    }
28231}
28232impl MessageData for HIGH_LATENCY_DATA {
28233    type Message = MavMessage;
28234    const ID: u32 = 234u32;
28235    const NAME: &'static str = "HIGH_LATENCY";
28236    const EXTRA_CRC: u8 = 150u8;
28237    const ENCODED_LEN: usize = 40usize;
28238    fn deser(
28239        _version: MavlinkVersion,
28240        __input: &[u8],
28241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28242        let avail_len = __input.len();
28243        let mut payload_buf = [0; Self::ENCODED_LEN];
28244        let mut buf = if avail_len < Self::ENCODED_LEN {
28245            payload_buf[0..avail_len].copy_from_slice(__input);
28246            Bytes::new(&payload_buf)
28247        } else {
28248            Bytes::new(__input)
28249        };
28250        let mut __struct = Self::default();
28251        __struct.custom_mode = buf.get_u32_le();
28252        __struct.latitude = buf.get_i32_le();
28253        __struct.longitude = buf.get_i32_le();
28254        __struct.roll = buf.get_i16_le();
28255        __struct.pitch = buf.get_i16_le();
28256        __struct.heading = buf.get_u16_le();
28257        __struct.heading_sp = buf.get_i16_le();
28258        __struct.altitude_amsl = buf.get_i16_le();
28259        __struct.altitude_sp = buf.get_i16_le();
28260        __struct.wp_distance = buf.get_u16_le();
28261        let tmp = buf.get_u8();
28262        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
28263            ::mavlink_core::error::ParserError::InvalidFlag {
28264                flag_type: "MavModeFlag",
28265                value: tmp as u32,
28266            },
28267        )?;
28268        let tmp = buf.get_u8();
28269        __struct.landed_state =
28270            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28271                enum_type: "MavLandedState",
28272                value: tmp as u32,
28273            })?;
28274        __struct.throttle = buf.get_i8();
28275        __struct.airspeed = buf.get_u8();
28276        __struct.airspeed_sp = buf.get_u8();
28277        __struct.groundspeed = buf.get_u8();
28278        __struct.climb_rate = buf.get_i8();
28279        __struct.gps_nsat = buf.get_u8();
28280        let tmp = buf.get_u8();
28281        __struct.gps_fix_type =
28282            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28283                enum_type: "GpsFixType",
28284                value: tmp as u32,
28285            })?;
28286        __struct.battery_remaining = buf.get_u8();
28287        __struct.temperature = buf.get_i8();
28288        __struct.temperature_air = buf.get_i8();
28289        __struct.failsafe = buf.get_u8();
28290        __struct.wp_num = buf.get_u8();
28291        Ok(__struct)
28292    }
28293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28294        let mut __tmp = BytesMut::new(bytes);
28295        #[allow(clippy::absurd_extreme_comparisons)]
28296        #[allow(unused_comparisons)]
28297        if __tmp.remaining() < Self::ENCODED_LEN {
28298            panic!(
28299                "buffer is too small (need {} bytes, but got {})",
28300                Self::ENCODED_LEN,
28301                __tmp.remaining(),
28302            )
28303        }
28304        __tmp.put_u32_le(self.custom_mode);
28305        __tmp.put_i32_le(self.latitude);
28306        __tmp.put_i32_le(self.longitude);
28307        __tmp.put_i16_le(self.roll);
28308        __tmp.put_i16_le(self.pitch);
28309        __tmp.put_u16_le(self.heading);
28310        __tmp.put_i16_le(self.heading_sp);
28311        __tmp.put_i16_le(self.altitude_amsl);
28312        __tmp.put_i16_le(self.altitude_sp);
28313        __tmp.put_u16_le(self.wp_distance);
28314        __tmp.put_u8(self.base_mode.bits());
28315        __tmp.put_u8(self.landed_state as u8);
28316        __tmp.put_i8(self.throttle);
28317        __tmp.put_u8(self.airspeed);
28318        __tmp.put_u8(self.airspeed_sp);
28319        __tmp.put_u8(self.groundspeed);
28320        __tmp.put_i8(self.climb_rate);
28321        __tmp.put_u8(self.gps_nsat);
28322        __tmp.put_u8(self.gps_fix_type as u8);
28323        __tmp.put_u8(self.battery_remaining);
28324        __tmp.put_i8(self.temperature);
28325        __tmp.put_i8(self.temperature_air);
28326        __tmp.put_u8(self.failsafe);
28327        __tmp.put_u8(self.wp_num);
28328        if matches!(version, MavlinkVersion::V2) {
28329            let len = __tmp.len();
28330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28331        } else {
28332            __tmp.len()
28333        }
28334    }
28335}
28336#[doc = "id: 113"]
28337#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
28338#[derive(Debug, Clone, PartialEq)]
28339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28341pub struct HIL_GPS_DATA {
28342    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28343    pub time_usec: u64,
28344    #[doc = "Latitude (WGS84)"]
28345    pub lat: i32,
28346    #[doc = "Longitude (WGS84)"]
28347    pub lon: i32,
28348    #[doc = "Altitude (MSL). Positive for up."]
28349    pub alt: i32,
28350    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
28351    pub eph: u16,
28352    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
28353    pub epv: u16,
28354    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
28355    pub vel: u16,
28356    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
28357    pub vn: i16,
28358    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
28359    pub ve: i16,
28360    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
28361    pub vd: i16,
28362    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
28363    pub cog: u16,
28364    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
28365    pub fix_type: u8,
28366    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
28367    pub satellites_visible: u8,
28368    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
28369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28370    pub id: u8,
28371    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
28372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28373    pub yaw: u16,
28374}
28375impl HIL_GPS_DATA {
28376    pub const ENCODED_LEN: usize = 39usize;
28377    pub const DEFAULT: Self = Self {
28378        time_usec: 0_u64,
28379        lat: 0_i32,
28380        lon: 0_i32,
28381        alt: 0_i32,
28382        eph: 0_u16,
28383        epv: 0_u16,
28384        vel: 0_u16,
28385        vn: 0_i16,
28386        ve: 0_i16,
28387        vd: 0_i16,
28388        cog: 0_u16,
28389        fix_type: 0_u8,
28390        satellites_visible: 0_u8,
28391        id: 0_u8,
28392        yaw: 0_u16,
28393    };
28394    #[cfg(feature = "arbitrary")]
28395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28396        use arbitrary::{Arbitrary, Unstructured};
28397        let mut buf = [0u8; 1024];
28398        rng.fill_bytes(&mut buf);
28399        let mut unstructured = Unstructured::new(&buf);
28400        Self::arbitrary(&mut unstructured).unwrap_or_default()
28401    }
28402}
28403impl Default for HIL_GPS_DATA {
28404    fn default() -> Self {
28405        Self::DEFAULT.clone()
28406    }
28407}
28408impl MessageData for HIL_GPS_DATA {
28409    type Message = MavMessage;
28410    const ID: u32 = 113u32;
28411    const NAME: &'static str = "HIL_GPS";
28412    const EXTRA_CRC: u8 = 124u8;
28413    const ENCODED_LEN: usize = 39usize;
28414    fn deser(
28415        _version: MavlinkVersion,
28416        __input: &[u8],
28417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28418        let avail_len = __input.len();
28419        let mut payload_buf = [0; Self::ENCODED_LEN];
28420        let mut buf = if avail_len < Self::ENCODED_LEN {
28421            payload_buf[0..avail_len].copy_from_slice(__input);
28422            Bytes::new(&payload_buf)
28423        } else {
28424            Bytes::new(__input)
28425        };
28426        let mut __struct = Self::default();
28427        __struct.time_usec = buf.get_u64_le();
28428        __struct.lat = buf.get_i32_le();
28429        __struct.lon = buf.get_i32_le();
28430        __struct.alt = buf.get_i32_le();
28431        __struct.eph = buf.get_u16_le();
28432        __struct.epv = buf.get_u16_le();
28433        __struct.vel = buf.get_u16_le();
28434        __struct.vn = buf.get_i16_le();
28435        __struct.ve = buf.get_i16_le();
28436        __struct.vd = buf.get_i16_le();
28437        __struct.cog = buf.get_u16_le();
28438        __struct.fix_type = buf.get_u8();
28439        __struct.satellites_visible = buf.get_u8();
28440        __struct.id = buf.get_u8();
28441        __struct.yaw = buf.get_u16_le();
28442        Ok(__struct)
28443    }
28444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28445        let mut __tmp = BytesMut::new(bytes);
28446        #[allow(clippy::absurd_extreme_comparisons)]
28447        #[allow(unused_comparisons)]
28448        if __tmp.remaining() < Self::ENCODED_LEN {
28449            panic!(
28450                "buffer is too small (need {} bytes, but got {})",
28451                Self::ENCODED_LEN,
28452                __tmp.remaining(),
28453            )
28454        }
28455        __tmp.put_u64_le(self.time_usec);
28456        __tmp.put_i32_le(self.lat);
28457        __tmp.put_i32_le(self.lon);
28458        __tmp.put_i32_le(self.alt);
28459        __tmp.put_u16_le(self.eph);
28460        __tmp.put_u16_le(self.epv);
28461        __tmp.put_u16_le(self.vel);
28462        __tmp.put_i16_le(self.vn);
28463        __tmp.put_i16_le(self.ve);
28464        __tmp.put_i16_le(self.vd);
28465        __tmp.put_u16_le(self.cog);
28466        __tmp.put_u8(self.fix_type);
28467        __tmp.put_u8(self.satellites_visible);
28468        __tmp.put_u8(self.id);
28469        __tmp.put_u16_le(self.yaw);
28470        if matches!(version, MavlinkVersion::V2) {
28471            let len = __tmp.len();
28472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28473        } else {
28474            __tmp.len()
28475        }
28476    }
28477}
28478#[doc = "id: 397"]
28479#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
28480#[derive(Debug, Clone, PartialEq)]
28481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28483pub struct COMPONENT_METADATA_DATA {
28484    #[doc = "Timestamp (time since system boot)."]
28485    pub time_boot_ms: u32,
28486    #[doc = "CRC32 of the general metadata file."]
28487    pub file_crc: u32,
28488    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
28489    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28490    pub uri: [u8; 100],
28491}
28492impl COMPONENT_METADATA_DATA {
28493    pub const ENCODED_LEN: usize = 108usize;
28494    pub const DEFAULT: Self = Self {
28495        time_boot_ms: 0_u32,
28496        file_crc: 0_u32,
28497        uri: [0_u8; 100usize],
28498    };
28499    #[cfg(feature = "arbitrary")]
28500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28501        use arbitrary::{Arbitrary, Unstructured};
28502        let mut buf = [0u8; 1024];
28503        rng.fill_bytes(&mut buf);
28504        let mut unstructured = Unstructured::new(&buf);
28505        Self::arbitrary(&mut unstructured).unwrap_or_default()
28506    }
28507}
28508impl Default for COMPONENT_METADATA_DATA {
28509    fn default() -> Self {
28510        Self::DEFAULT.clone()
28511    }
28512}
28513impl MessageData for COMPONENT_METADATA_DATA {
28514    type Message = MavMessage;
28515    const ID: u32 = 397u32;
28516    const NAME: &'static str = "COMPONENT_METADATA";
28517    const EXTRA_CRC: u8 = 182u8;
28518    const ENCODED_LEN: usize = 108usize;
28519    fn deser(
28520        _version: MavlinkVersion,
28521        __input: &[u8],
28522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28523        let avail_len = __input.len();
28524        let mut payload_buf = [0; Self::ENCODED_LEN];
28525        let mut buf = if avail_len < Self::ENCODED_LEN {
28526            payload_buf[0..avail_len].copy_from_slice(__input);
28527            Bytes::new(&payload_buf)
28528        } else {
28529            Bytes::new(__input)
28530        };
28531        let mut __struct = Self::default();
28532        __struct.time_boot_ms = buf.get_u32_le();
28533        __struct.file_crc = buf.get_u32_le();
28534        for v in &mut __struct.uri {
28535            let val = buf.get_u8();
28536            *v = val;
28537        }
28538        Ok(__struct)
28539    }
28540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28541        let mut __tmp = BytesMut::new(bytes);
28542        #[allow(clippy::absurd_extreme_comparisons)]
28543        #[allow(unused_comparisons)]
28544        if __tmp.remaining() < Self::ENCODED_LEN {
28545            panic!(
28546                "buffer is too small (need {} bytes, but got {})",
28547                Self::ENCODED_LEN,
28548                __tmp.remaining(),
28549            )
28550        }
28551        __tmp.put_u32_le(self.time_boot_ms);
28552        __tmp.put_u32_le(self.file_crc);
28553        for val in &self.uri {
28554            __tmp.put_u8(*val);
28555        }
28556        if matches!(version, MavlinkVersion::V2) {
28557            let len = __tmp.len();
28558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28559        } else {
28560            __tmp.len()
28561        }
28562    }
28563}
28564#[doc = "id: 8006"]
28565#[doc = "Extended state information for ASLUAVs."]
28566#[derive(Debug, Clone, PartialEq)]
28567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28569pub struct ASLUAV_STATUS_DATA {
28570    #[doc = "Motor RPM"]
28571    pub Motor_rpm: f32,
28572    #[doc = "Status of the position-indicator LEDs"]
28573    pub LED_status: u8,
28574    #[doc = "Status of the IRIDIUM satellite communication system"]
28575    pub SATCOM_status: u8,
28576    #[doc = "Status vector for up to 8 servos"]
28577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28578    pub Servo_status: [u8; 8],
28579}
28580impl ASLUAV_STATUS_DATA {
28581    pub const ENCODED_LEN: usize = 14usize;
28582    pub const DEFAULT: Self = Self {
28583        Motor_rpm: 0.0_f32,
28584        LED_status: 0_u8,
28585        SATCOM_status: 0_u8,
28586        Servo_status: [0_u8; 8usize],
28587    };
28588    #[cfg(feature = "arbitrary")]
28589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28590        use arbitrary::{Arbitrary, Unstructured};
28591        let mut buf = [0u8; 1024];
28592        rng.fill_bytes(&mut buf);
28593        let mut unstructured = Unstructured::new(&buf);
28594        Self::arbitrary(&mut unstructured).unwrap_or_default()
28595    }
28596}
28597impl Default for ASLUAV_STATUS_DATA {
28598    fn default() -> Self {
28599        Self::DEFAULT.clone()
28600    }
28601}
28602impl MessageData for ASLUAV_STATUS_DATA {
28603    type Message = MavMessage;
28604    const ID: u32 = 8006u32;
28605    const NAME: &'static str = "ASLUAV_STATUS";
28606    const EXTRA_CRC: u8 = 97u8;
28607    const ENCODED_LEN: usize = 14usize;
28608    fn deser(
28609        _version: MavlinkVersion,
28610        __input: &[u8],
28611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28612        let avail_len = __input.len();
28613        let mut payload_buf = [0; Self::ENCODED_LEN];
28614        let mut buf = if avail_len < Self::ENCODED_LEN {
28615            payload_buf[0..avail_len].copy_from_slice(__input);
28616            Bytes::new(&payload_buf)
28617        } else {
28618            Bytes::new(__input)
28619        };
28620        let mut __struct = Self::default();
28621        __struct.Motor_rpm = buf.get_f32_le();
28622        __struct.LED_status = buf.get_u8();
28623        __struct.SATCOM_status = buf.get_u8();
28624        for v in &mut __struct.Servo_status {
28625            let val = buf.get_u8();
28626            *v = val;
28627        }
28628        Ok(__struct)
28629    }
28630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28631        let mut __tmp = BytesMut::new(bytes);
28632        #[allow(clippy::absurd_extreme_comparisons)]
28633        #[allow(unused_comparisons)]
28634        if __tmp.remaining() < Self::ENCODED_LEN {
28635            panic!(
28636                "buffer is too small (need {} bytes, but got {})",
28637                Self::ENCODED_LEN,
28638                __tmp.remaining(),
28639            )
28640        }
28641        __tmp.put_f32_le(self.Motor_rpm);
28642        __tmp.put_u8(self.LED_status);
28643        __tmp.put_u8(self.SATCOM_status);
28644        for val in &self.Servo_status {
28645            __tmp.put_u8(*val);
28646        }
28647        if matches!(version, MavlinkVersion::V2) {
28648            let len = __tmp.len();
28649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28650        } else {
28651            __tmp.len()
28652        }
28653    }
28654}
28655#[doc = "id: 8004"]
28656#[doc = "ASL-fixed-wing controller data."]
28657#[derive(Debug, Clone, PartialEq)]
28658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28660pub struct ASLCTRL_DATA_DATA {
28661    #[doc = "Timestamp"]
28662    pub timestamp: u64,
28663    #[doc = "See sourcecode for a description of these values..."]
28664    pub h: f32,
28665    pub hRef: f32,
28666    pub hRef_t: f32,
28667    #[doc = "Pitch angle"]
28668    pub PitchAngle: f32,
28669    #[doc = "Pitch angle reference"]
28670    pub PitchAngleRef: f32,
28671    pub q: f32,
28672    pub qRef: f32,
28673    pub uElev: f32,
28674    pub uThrot: f32,
28675    pub uThrot2: f32,
28676    pub nZ: f32,
28677    #[doc = "Airspeed reference"]
28678    pub AirspeedRef: f32,
28679    #[doc = "Yaw angle"]
28680    pub YawAngle: f32,
28681    #[doc = "Yaw angle reference"]
28682    pub YawAngleRef: f32,
28683    #[doc = "Roll angle"]
28684    pub RollAngle: f32,
28685    #[doc = "Roll angle reference"]
28686    pub RollAngleRef: f32,
28687    pub p: f32,
28688    pub pRef: f32,
28689    pub r: f32,
28690    pub rRef: f32,
28691    pub uAil: f32,
28692    pub uRud: f32,
28693    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
28694    pub aslctrl_mode: u8,
28695    pub SpoilersEngaged: u8,
28696}
28697impl ASLCTRL_DATA_DATA {
28698    pub const ENCODED_LEN: usize = 98usize;
28699    pub const DEFAULT: Self = Self {
28700        timestamp: 0_u64,
28701        h: 0.0_f32,
28702        hRef: 0.0_f32,
28703        hRef_t: 0.0_f32,
28704        PitchAngle: 0.0_f32,
28705        PitchAngleRef: 0.0_f32,
28706        q: 0.0_f32,
28707        qRef: 0.0_f32,
28708        uElev: 0.0_f32,
28709        uThrot: 0.0_f32,
28710        uThrot2: 0.0_f32,
28711        nZ: 0.0_f32,
28712        AirspeedRef: 0.0_f32,
28713        YawAngle: 0.0_f32,
28714        YawAngleRef: 0.0_f32,
28715        RollAngle: 0.0_f32,
28716        RollAngleRef: 0.0_f32,
28717        p: 0.0_f32,
28718        pRef: 0.0_f32,
28719        r: 0.0_f32,
28720        rRef: 0.0_f32,
28721        uAil: 0.0_f32,
28722        uRud: 0.0_f32,
28723        aslctrl_mode: 0_u8,
28724        SpoilersEngaged: 0_u8,
28725    };
28726    #[cfg(feature = "arbitrary")]
28727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28728        use arbitrary::{Arbitrary, Unstructured};
28729        let mut buf = [0u8; 1024];
28730        rng.fill_bytes(&mut buf);
28731        let mut unstructured = Unstructured::new(&buf);
28732        Self::arbitrary(&mut unstructured).unwrap_or_default()
28733    }
28734}
28735impl Default for ASLCTRL_DATA_DATA {
28736    fn default() -> Self {
28737        Self::DEFAULT.clone()
28738    }
28739}
28740impl MessageData for ASLCTRL_DATA_DATA {
28741    type Message = MavMessage;
28742    const ID: u32 = 8004u32;
28743    const NAME: &'static str = "ASLCTRL_DATA";
28744    const EXTRA_CRC: u8 = 172u8;
28745    const ENCODED_LEN: usize = 98usize;
28746    fn deser(
28747        _version: MavlinkVersion,
28748        __input: &[u8],
28749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28750        let avail_len = __input.len();
28751        let mut payload_buf = [0; Self::ENCODED_LEN];
28752        let mut buf = if avail_len < Self::ENCODED_LEN {
28753            payload_buf[0..avail_len].copy_from_slice(__input);
28754            Bytes::new(&payload_buf)
28755        } else {
28756            Bytes::new(__input)
28757        };
28758        let mut __struct = Self::default();
28759        __struct.timestamp = buf.get_u64_le();
28760        __struct.h = buf.get_f32_le();
28761        __struct.hRef = buf.get_f32_le();
28762        __struct.hRef_t = buf.get_f32_le();
28763        __struct.PitchAngle = buf.get_f32_le();
28764        __struct.PitchAngleRef = buf.get_f32_le();
28765        __struct.q = buf.get_f32_le();
28766        __struct.qRef = buf.get_f32_le();
28767        __struct.uElev = buf.get_f32_le();
28768        __struct.uThrot = buf.get_f32_le();
28769        __struct.uThrot2 = buf.get_f32_le();
28770        __struct.nZ = buf.get_f32_le();
28771        __struct.AirspeedRef = buf.get_f32_le();
28772        __struct.YawAngle = buf.get_f32_le();
28773        __struct.YawAngleRef = buf.get_f32_le();
28774        __struct.RollAngle = buf.get_f32_le();
28775        __struct.RollAngleRef = buf.get_f32_le();
28776        __struct.p = buf.get_f32_le();
28777        __struct.pRef = buf.get_f32_le();
28778        __struct.r = buf.get_f32_le();
28779        __struct.rRef = buf.get_f32_le();
28780        __struct.uAil = buf.get_f32_le();
28781        __struct.uRud = buf.get_f32_le();
28782        __struct.aslctrl_mode = buf.get_u8();
28783        __struct.SpoilersEngaged = buf.get_u8();
28784        Ok(__struct)
28785    }
28786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28787        let mut __tmp = BytesMut::new(bytes);
28788        #[allow(clippy::absurd_extreme_comparisons)]
28789        #[allow(unused_comparisons)]
28790        if __tmp.remaining() < Self::ENCODED_LEN {
28791            panic!(
28792                "buffer is too small (need {} bytes, but got {})",
28793                Self::ENCODED_LEN,
28794                __tmp.remaining(),
28795            )
28796        }
28797        __tmp.put_u64_le(self.timestamp);
28798        __tmp.put_f32_le(self.h);
28799        __tmp.put_f32_le(self.hRef);
28800        __tmp.put_f32_le(self.hRef_t);
28801        __tmp.put_f32_le(self.PitchAngle);
28802        __tmp.put_f32_le(self.PitchAngleRef);
28803        __tmp.put_f32_le(self.q);
28804        __tmp.put_f32_le(self.qRef);
28805        __tmp.put_f32_le(self.uElev);
28806        __tmp.put_f32_le(self.uThrot);
28807        __tmp.put_f32_le(self.uThrot2);
28808        __tmp.put_f32_le(self.nZ);
28809        __tmp.put_f32_le(self.AirspeedRef);
28810        __tmp.put_f32_le(self.YawAngle);
28811        __tmp.put_f32_le(self.YawAngleRef);
28812        __tmp.put_f32_le(self.RollAngle);
28813        __tmp.put_f32_le(self.RollAngleRef);
28814        __tmp.put_f32_le(self.p);
28815        __tmp.put_f32_le(self.pRef);
28816        __tmp.put_f32_le(self.r);
28817        __tmp.put_f32_le(self.rRef);
28818        __tmp.put_f32_le(self.uAil);
28819        __tmp.put_f32_le(self.uRud);
28820        __tmp.put_u8(self.aslctrl_mode);
28821        __tmp.put_u8(self.SpoilersEngaged);
28822        if matches!(version, MavlinkVersion::V2) {
28823            let len = __tmp.len();
28824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28825        } else {
28826            __tmp.len()
28827        }
28828    }
28829}
28830#[doc = "id: 401"]
28831#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28832#[derive(Debug, Clone, PartialEq)]
28833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28835pub struct SUPPORTED_TUNES_DATA {
28836    #[doc = "Bitfield of supported tune formats."]
28837    pub format: TuneFormat,
28838    #[doc = "System ID"]
28839    pub target_system: u8,
28840    #[doc = "Component ID"]
28841    pub target_component: u8,
28842}
28843impl SUPPORTED_TUNES_DATA {
28844    pub const ENCODED_LEN: usize = 6usize;
28845    pub const DEFAULT: Self = Self {
28846        format: TuneFormat::DEFAULT,
28847        target_system: 0_u8,
28848        target_component: 0_u8,
28849    };
28850    #[cfg(feature = "arbitrary")]
28851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28852        use arbitrary::{Arbitrary, Unstructured};
28853        let mut buf = [0u8; 1024];
28854        rng.fill_bytes(&mut buf);
28855        let mut unstructured = Unstructured::new(&buf);
28856        Self::arbitrary(&mut unstructured).unwrap_or_default()
28857    }
28858}
28859impl Default for SUPPORTED_TUNES_DATA {
28860    fn default() -> Self {
28861        Self::DEFAULT.clone()
28862    }
28863}
28864impl MessageData for SUPPORTED_TUNES_DATA {
28865    type Message = MavMessage;
28866    const ID: u32 = 401u32;
28867    const NAME: &'static str = "SUPPORTED_TUNES";
28868    const EXTRA_CRC: u8 = 183u8;
28869    const ENCODED_LEN: usize = 6usize;
28870    fn deser(
28871        _version: MavlinkVersion,
28872        __input: &[u8],
28873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28874        let avail_len = __input.len();
28875        let mut payload_buf = [0; Self::ENCODED_LEN];
28876        let mut buf = if avail_len < Self::ENCODED_LEN {
28877            payload_buf[0..avail_len].copy_from_slice(__input);
28878            Bytes::new(&payload_buf)
28879        } else {
28880            Bytes::new(__input)
28881        };
28882        let mut __struct = Self::default();
28883        let tmp = buf.get_u32_le();
28884        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28885            ::mavlink_core::error::ParserError::InvalidEnum {
28886                enum_type: "TuneFormat",
28887                value: tmp as u32,
28888            },
28889        )?;
28890        __struct.target_system = buf.get_u8();
28891        __struct.target_component = buf.get_u8();
28892        Ok(__struct)
28893    }
28894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28895        let mut __tmp = BytesMut::new(bytes);
28896        #[allow(clippy::absurd_extreme_comparisons)]
28897        #[allow(unused_comparisons)]
28898        if __tmp.remaining() < Self::ENCODED_LEN {
28899            panic!(
28900                "buffer is too small (need {} bytes, but got {})",
28901                Self::ENCODED_LEN,
28902                __tmp.remaining(),
28903            )
28904        }
28905        __tmp.put_u32_le(self.format as u32);
28906        __tmp.put_u8(self.target_system);
28907        __tmp.put_u8(self.target_component);
28908        if matches!(version, MavlinkVersion::V2) {
28909            let len = __tmp.len();
28910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28911        } else {
28912            __tmp.len()
28913        }
28914    }
28915}
28916#[doc = "id: 4"]
28917#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
28918#[derive(Debug, Clone, PartialEq)]
28919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28921pub struct PING_DATA {
28922    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28923    pub time_usec: u64,
28924    #[doc = "PING sequence"]
28925    pub seq: u32,
28926    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
28927    pub target_system: u8,
28928    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
28929    pub target_component: u8,
28930}
28931impl PING_DATA {
28932    pub const ENCODED_LEN: usize = 14usize;
28933    pub const DEFAULT: Self = Self {
28934        time_usec: 0_u64,
28935        seq: 0_u32,
28936        target_system: 0_u8,
28937        target_component: 0_u8,
28938    };
28939    #[cfg(feature = "arbitrary")]
28940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28941        use arbitrary::{Arbitrary, Unstructured};
28942        let mut buf = [0u8; 1024];
28943        rng.fill_bytes(&mut buf);
28944        let mut unstructured = Unstructured::new(&buf);
28945        Self::arbitrary(&mut unstructured).unwrap_or_default()
28946    }
28947}
28948impl Default for PING_DATA {
28949    fn default() -> Self {
28950        Self::DEFAULT.clone()
28951    }
28952}
28953impl MessageData for PING_DATA {
28954    type Message = MavMessage;
28955    const ID: u32 = 4u32;
28956    const NAME: &'static str = "PING";
28957    const EXTRA_CRC: u8 = 237u8;
28958    const ENCODED_LEN: usize = 14usize;
28959    fn deser(
28960        _version: MavlinkVersion,
28961        __input: &[u8],
28962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28963        let avail_len = __input.len();
28964        let mut payload_buf = [0; Self::ENCODED_LEN];
28965        let mut buf = if avail_len < Self::ENCODED_LEN {
28966            payload_buf[0..avail_len].copy_from_slice(__input);
28967            Bytes::new(&payload_buf)
28968        } else {
28969            Bytes::new(__input)
28970        };
28971        let mut __struct = Self::default();
28972        __struct.time_usec = buf.get_u64_le();
28973        __struct.seq = buf.get_u32_le();
28974        __struct.target_system = buf.get_u8();
28975        __struct.target_component = buf.get_u8();
28976        Ok(__struct)
28977    }
28978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28979        let mut __tmp = BytesMut::new(bytes);
28980        #[allow(clippy::absurd_extreme_comparisons)]
28981        #[allow(unused_comparisons)]
28982        if __tmp.remaining() < Self::ENCODED_LEN {
28983            panic!(
28984                "buffer is too small (need {} bytes, but got {})",
28985                Self::ENCODED_LEN,
28986                __tmp.remaining(),
28987            )
28988        }
28989        __tmp.put_u64_le(self.time_usec);
28990        __tmp.put_u32_le(self.seq);
28991        __tmp.put_u8(self.target_system);
28992        __tmp.put_u8(self.target_component);
28993        if matches!(version, MavlinkVersion::V2) {
28994            let len = __tmp.len();
28995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28996        } else {
28997            __tmp.len()
28998        }
28999    }
29000}
29001#[doc = "id: 395"]
29002#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
29003#[derive(Debug, Clone, PartialEq)]
29004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29006pub struct COMPONENT_INFORMATION_DATA {
29007    #[doc = "Timestamp (time since system boot)."]
29008    pub time_boot_ms: u32,
29009    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
29010    pub general_metadata_file_crc: u32,
29011    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
29012    pub peripherals_metadata_file_crc: u32,
29013    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
29014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29015    pub general_metadata_uri: [u8; 100],
29016    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
29017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29018    pub peripherals_metadata_uri: [u8; 100],
29019}
29020impl COMPONENT_INFORMATION_DATA {
29021    pub const ENCODED_LEN: usize = 212usize;
29022    pub const DEFAULT: Self = Self {
29023        time_boot_ms: 0_u32,
29024        general_metadata_file_crc: 0_u32,
29025        peripherals_metadata_file_crc: 0_u32,
29026        general_metadata_uri: [0_u8; 100usize],
29027        peripherals_metadata_uri: [0_u8; 100usize],
29028    };
29029    #[cfg(feature = "arbitrary")]
29030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29031        use arbitrary::{Arbitrary, Unstructured};
29032        let mut buf = [0u8; 1024];
29033        rng.fill_bytes(&mut buf);
29034        let mut unstructured = Unstructured::new(&buf);
29035        Self::arbitrary(&mut unstructured).unwrap_or_default()
29036    }
29037}
29038impl Default for COMPONENT_INFORMATION_DATA {
29039    fn default() -> Self {
29040        Self::DEFAULT.clone()
29041    }
29042}
29043impl MessageData for COMPONENT_INFORMATION_DATA {
29044    type Message = MavMessage;
29045    const ID: u32 = 395u32;
29046    const NAME: &'static str = "COMPONENT_INFORMATION";
29047    const EXTRA_CRC: u8 = 0u8;
29048    const ENCODED_LEN: usize = 212usize;
29049    fn deser(
29050        _version: MavlinkVersion,
29051        __input: &[u8],
29052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29053        let avail_len = __input.len();
29054        let mut payload_buf = [0; Self::ENCODED_LEN];
29055        let mut buf = if avail_len < Self::ENCODED_LEN {
29056            payload_buf[0..avail_len].copy_from_slice(__input);
29057            Bytes::new(&payload_buf)
29058        } else {
29059            Bytes::new(__input)
29060        };
29061        let mut __struct = Self::default();
29062        __struct.time_boot_ms = buf.get_u32_le();
29063        __struct.general_metadata_file_crc = buf.get_u32_le();
29064        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
29065        for v in &mut __struct.general_metadata_uri {
29066            let val = buf.get_u8();
29067            *v = val;
29068        }
29069        for v in &mut __struct.peripherals_metadata_uri {
29070            let val = buf.get_u8();
29071            *v = val;
29072        }
29073        Ok(__struct)
29074    }
29075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29076        let mut __tmp = BytesMut::new(bytes);
29077        #[allow(clippy::absurd_extreme_comparisons)]
29078        #[allow(unused_comparisons)]
29079        if __tmp.remaining() < Self::ENCODED_LEN {
29080            panic!(
29081                "buffer is too small (need {} bytes, but got {})",
29082                Self::ENCODED_LEN,
29083                __tmp.remaining(),
29084            )
29085        }
29086        __tmp.put_u32_le(self.time_boot_ms);
29087        __tmp.put_u32_le(self.general_metadata_file_crc);
29088        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
29089        for val in &self.general_metadata_uri {
29090            __tmp.put_u8(*val);
29091        }
29092        for val in &self.peripherals_metadata_uri {
29093            __tmp.put_u8(*val);
29094        }
29095        if matches!(version, MavlinkVersion::V2) {
29096            let len = __tmp.len();
29097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29098        } else {
29099            __tmp.len()
29100        }
29101    }
29102}
29103#[doc = "id: 127"]
29104#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
29105#[derive(Debug, Clone, PartialEq)]
29106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29108pub struct GPS_RTK_DATA {
29109    #[doc = "Time since boot of last baseline message received."]
29110    pub time_last_baseline_ms: u32,
29111    #[doc = "GPS Time of Week of last baseline"]
29112    pub tow: u32,
29113    #[doc = "Current baseline in ECEF x or NED north component."]
29114    pub baseline_a_mm: i32,
29115    #[doc = "Current baseline in ECEF y or NED east component."]
29116    pub baseline_b_mm: i32,
29117    #[doc = "Current baseline in ECEF z or NED down component."]
29118    pub baseline_c_mm: i32,
29119    #[doc = "Current estimate of baseline accuracy."]
29120    pub accuracy: u32,
29121    #[doc = "Current number of integer ambiguity hypotheses."]
29122    pub iar_num_hypotheses: i32,
29123    #[doc = "GPS Week Number of last baseline"]
29124    pub wn: u16,
29125    #[doc = "Identification of connected RTK receiver."]
29126    pub rtk_receiver_id: u8,
29127    #[doc = "GPS-specific health report for RTK data."]
29128    pub rtk_health: u8,
29129    #[doc = "Rate of baseline messages being received by GPS"]
29130    pub rtk_rate: u8,
29131    #[doc = "Current number of sats used for RTK calculation."]
29132    pub nsats: u8,
29133    #[doc = "Coordinate system of baseline"]
29134    pub baseline_coords_type: RtkBaselineCoordinateSystem,
29135}
29136impl GPS_RTK_DATA {
29137    pub const ENCODED_LEN: usize = 35usize;
29138    pub const DEFAULT: Self = Self {
29139        time_last_baseline_ms: 0_u32,
29140        tow: 0_u32,
29141        baseline_a_mm: 0_i32,
29142        baseline_b_mm: 0_i32,
29143        baseline_c_mm: 0_i32,
29144        accuracy: 0_u32,
29145        iar_num_hypotheses: 0_i32,
29146        wn: 0_u16,
29147        rtk_receiver_id: 0_u8,
29148        rtk_health: 0_u8,
29149        rtk_rate: 0_u8,
29150        nsats: 0_u8,
29151        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
29152    };
29153    #[cfg(feature = "arbitrary")]
29154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29155        use arbitrary::{Arbitrary, Unstructured};
29156        let mut buf = [0u8; 1024];
29157        rng.fill_bytes(&mut buf);
29158        let mut unstructured = Unstructured::new(&buf);
29159        Self::arbitrary(&mut unstructured).unwrap_or_default()
29160    }
29161}
29162impl Default for GPS_RTK_DATA {
29163    fn default() -> Self {
29164        Self::DEFAULT.clone()
29165    }
29166}
29167impl MessageData for GPS_RTK_DATA {
29168    type Message = MavMessage;
29169    const ID: u32 = 127u32;
29170    const NAME: &'static str = "GPS_RTK";
29171    const EXTRA_CRC: u8 = 25u8;
29172    const ENCODED_LEN: usize = 35usize;
29173    fn deser(
29174        _version: MavlinkVersion,
29175        __input: &[u8],
29176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29177        let avail_len = __input.len();
29178        let mut payload_buf = [0; Self::ENCODED_LEN];
29179        let mut buf = if avail_len < Self::ENCODED_LEN {
29180            payload_buf[0..avail_len].copy_from_slice(__input);
29181            Bytes::new(&payload_buf)
29182        } else {
29183            Bytes::new(__input)
29184        };
29185        let mut __struct = Self::default();
29186        __struct.time_last_baseline_ms = buf.get_u32_le();
29187        __struct.tow = buf.get_u32_le();
29188        __struct.baseline_a_mm = buf.get_i32_le();
29189        __struct.baseline_b_mm = buf.get_i32_le();
29190        __struct.baseline_c_mm = buf.get_i32_le();
29191        __struct.accuracy = buf.get_u32_le();
29192        __struct.iar_num_hypotheses = buf.get_i32_le();
29193        __struct.wn = buf.get_u16_le();
29194        __struct.rtk_receiver_id = buf.get_u8();
29195        __struct.rtk_health = buf.get_u8();
29196        __struct.rtk_rate = buf.get_u8();
29197        __struct.nsats = buf.get_u8();
29198        let tmp = buf.get_u8();
29199        __struct.baseline_coords_type =
29200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29201                enum_type: "RtkBaselineCoordinateSystem",
29202                value: tmp as u32,
29203            })?;
29204        Ok(__struct)
29205    }
29206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29207        let mut __tmp = BytesMut::new(bytes);
29208        #[allow(clippy::absurd_extreme_comparisons)]
29209        #[allow(unused_comparisons)]
29210        if __tmp.remaining() < Self::ENCODED_LEN {
29211            panic!(
29212                "buffer is too small (need {} bytes, but got {})",
29213                Self::ENCODED_LEN,
29214                __tmp.remaining(),
29215            )
29216        }
29217        __tmp.put_u32_le(self.time_last_baseline_ms);
29218        __tmp.put_u32_le(self.tow);
29219        __tmp.put_i32_le(self.baseline_a_mm);
29220        __tmp.put_i32_le(self.baseline_b_mm);
29221        __tmp.put_i32_le(self.baseline_c_mm);
29222        __tmp.put_u32_le(self.accuracy);
29223        __tmp.put_i32_le(self.iar_num_hypotheses);
29224        __tmp.put_u16_le(self.wn);
29225        __tmp.put_u8(self.rtk_receiver_id);
29226        __tmp.put_u8(self.rtk_health);
29227        __tmp.put_u8(self.rtk_rate);
29228        __tmp.put_u8(self.nsats);
29229        __tmp.put_u8(self.baseline_coords_type as u8);
29230        if matches!(version, MavlinkVersion::V2) {
29231            let len = __tmp.len();
29232            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29233        } else {
29234            __tmp.len()
29235        }
29236    }
29237}
29238#[doc = "id: 8012"]
29239#[doc = "Monitoring of sensorpod status."]
29240#[derive(Debug, Clone, PartialEq)]
29241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29243pub struct SENSORPOD_STATUS_DATA {
29244    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
29245    pub timestamp: u64,
29246    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
29247    pub free_space: u16,
29248    #[doc = "Rate of ROS topic 1"]
29249    pub visensor_rate_1: u8,
29250    #[doc = "Rate of ROS topic 2"]
29251    pub visensor_rate_2: u8,
29252    #[doc = "Rate of ROS topic 3"]
29253    pub visensor_rate_3: u8,
29254    #[doc = "Rate of ROS topic 4"]
29255    pub visensor_rate_4: u8,
29256    #[doc = "Number of recording nodes"]
29257    pub recording_nodes_count: u8,
29258    #[doc = "Temperature of sensorpod CPU in"]
29259    pub cpu_temp: u8,
29260}
29261impl SENSORPOD_STATUS_DATA {
29262    pub const ENCODED_LEN: usize = 16usize;
29263    pub const DEFAULT: Self = Self {
29264        timestamp: 0_u64,
29265        free_space: 0_u16,
29266        visensor_rate_1: 0_u8,
29267        visensor_rate_2: 0_u8,
29268        visensor_rate_3: 0_u8,
29269        visensor_rate_4: 0_u8,
29270        recording_nodes_count: 0_u8,
29271        cpu_temp: 0_u8,
29272    };
29273    #[cfg(feature = "arbitrary")]
29274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29275        use arbitrary::{Arbitrary, Unstructured};
29276        let mut buf = [0u8; 1024];
29277        rng.fill_bytes(&mut buf);
29278        let mut unstructured = Unstructured::new(&buf);
29279        Self::arbitrary(&mut unstructured).unwrap_or_default()
29280    }
29281}
29282impl Default for SENSORPOD_STATUS_DATA {
29283    fn default() -> Self {
29284        Self::DEFAULT.clone()
29285    }
29286}
29287impl MessageData for SENSORPOD_STATUS_DATA {
29288    type Message = MavMessage;
29289    const ID: u32 = 8012u32;
29290    const NAME: &'static str = "SENSORPOD_STATUS";
29291    const EXTRA_CRC: u8 = 54u8;
29292    const ENCODED_LEN: usize = 16usize;
29293    fn deser(
29294        _version: MavlinkVersion,
29295        __input: &[u8],
29296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29297        let avail_len = __input.len();
29298        let mut payload_buf = [0; Self::ENCODED_LEN];
29299        let mut buf = if avail_len < Self::ENCODED_LEN {
29300            payload_buf[0..avail_len].copy_from_slice(__input);
29301            Bytes::new(&payload_buf)
29302        } else {
29303            Bytes::new(__input)
29304        };
29305        let mut __struct = Self::default();
29306        __struct.timestamp = buf.get_u64_le();
29307        __struct.free_space = buf.get_u16_le();
29308        __struct.visensor_rate_1 = buf.get_u8();
29309        __struct.visensor_rate_2 = buf.get_u8();
29310        __struct.visensor_rate_3 = buf.get_u8();
29311        __struct.visensor_rate_4 = buf.get_u8();
29312        __struct.recording_nodes_count = buf.get_u8();
29313        __struct.cpu_temp = buf.get_u8();
29314        Ok(__struct)
29315    }
29316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29317        let mut __tmp = BytesMut::new(bytes);
29318        #[allow(clippy::absurd_extreme_comparisons)]
29319        #[allow(unused_comparisons)]
29320        if __tmp.remaining() < Self::ENCODED_LEN {
29321            panic!(
29322                "buffer is too small (need {} bytes, but got {})",
29323                Self::ENCODED_LEN,
29324                __tmp.remaining(),
29325            )
29326        }
29327        __tmp.put_u64_le(self.timestamp);
29328        __tmp.put_u16_le(self.free_space);
29329        __tmp.put_u8(self.visensor_rate_1);
29330        __tmp.put_u8(self.visensor_rate_2);
29331        __tmp.put_u8(self.visensor_rate_3);
29332        __tmp.put_u8(self.visensor_rate_4);
29333        __tmp.put_u8(self.recording_nodes_count);
29334        __tmp.put_u8(self.cpu_temp);
29335        if matches!(version, MavlinkVersion::V2) {
29336            let len = __tmp.len();
29337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29338        } else {
29339            __tmp.len()
29340        }
29341    }
29342}
29343#[doc = "id: 268"]
29344#[doc = "An ack for a LOGGING_DATA_ACKED message."]
29345#[derive(Debug, Clone, PartialEq)]
29346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29348pub struct LOGGING_ACK_DATA {
29349    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
29350    pub sequence: u16,
29351    #[doc = "system ID of the target"]
29352    pub target_system: u8,
29353    #[doc = "component ID of the target"]
29354    pub target_component: u8,
29355}
29356impl LOGGING_ACK_DATA {
29357    pub const ENCODED_LEN: usize = 4usize;
29358    pub const DEFAULT: Self = Self {
29359        sequence: 0_u16,
29360        target_system: 0_u8,
29361        target_component: 0_u8,
29362    };
29363    #[cfg(feature = "arbitrary")]
29364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29365        use arbitrary::{Arbitrary, Unstructured};
29366        let mut buf = [0u8; 1024];
29367        rng.fill_bytes(&mut buf);
29368        let mut unstructured = Unstructured::new(&buf);
29369        Self::arbitrary(&mut unstructured).unwrap_or_default()
29370    }
29371}
29372impl Default for LOGGING_ACK_DATA {
29373    fn default() -> Self {
29374        Self::DEFAULT.clone()
29375    }
29376}
29377impl MessageData for LOGGING_ACK_DATA {
29378    type Message = MavMessage;
29379    const ID: u32 = 268u32;
29380    const NAME: &'static str = "LOGGING_ACK";
29381    const EXTRA_CRC: u8 = 14u8;
29382    const ENCODED_LEN: usize = 4usize;
29383    fn deser(
29384        _version: MavlinkVersion,
29385        __input: &[u8],
29386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29387        let avail_len = __input.len();
29388        let mut payload_buf = [0; Self::ENCODED_LEN];
29389        let mut buf = if avail_len < Self::ENCODED_LEN {
29390            payload_buf[0..avail_len].copy_from_slice(__input);
29391            Bytes::new(&payload_buf)
29392        } else {
29393            Bytes::new(__input)
29394        };
29395        let mut __struct = Self::default();
29396        __struct.sequence = buf.get_u16_le();
29397        __struct.target_system = buf.get_u8();
29398        __struct.target_component = buf.get_u8();
29399        Ok(__struct)
29400    }
29401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29402        let mut __tmp = BytesMut::new(bytes);
29403        #[allow(clippy::absurd_extreme_comparisons)]
29404        #[allow(unused_comparisons)]
29405        if __tmp.remaining() < Self::ENCODED_LEN {
29406            panic!(
29407                "buffer is too small (need {} bytes, but got {})",
29408                Self::ENCODED_LEN,
29409                __tmp.remaining(),
29410            )
29411        }
29412        __tmp.put_u16_le(self.sequence);
29413        __tmp.put_u8(self.target_system);
29414        __tmp.put_u8(self.target_component);
29415        if matches!(version, MavlinkVersion::V2) {
29416            let len = __tmp.len();
29417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29418        } else {
29419            __tmp.len()
29420        }
29421    }
29422}
29423#[doc = "id: 77"]
29424#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
29425#[derive(Debug, Clone, PartialEq)]
29426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29428pub struct COMMAND_ACK_DATA {
29429    #[doc = "Command ID (of acknowledged command)."]
29430    pub command: MavCmd,
29431    #[doc = "Result of command."]
29432    pub result: MavResult,
29433    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
29434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29435    pub progress: u8,
29436    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
29437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29438    pub result_param2: i32,
29439    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
29440    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29441    pub target_system: u8,
29442    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
29443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29444    pub target_component: u8,
29445}
29446impl COMMAND_ACK_DATA {
29447    pub const ENCODED_LEN: usize = 10usize;
29448    pub const DEFAULT: Self = Self {
29449        command: MavCmd::DEFAULT,
29450        result: MavResult::DEFAULT,
29451        progress: 0_u8,
29452        result_param2: 0_i32,
29453        target_system: 0_u8,
29454        target_component: 0_u8,
29455    };
29456    #[cfg(feature = "arbitrary")]
29457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29458        use arbitrary::{Arbitrary, Unstructured};
29459        let mut buf = [0u8; 1024];
29460        rng.fill_bytes(&mut buf);
29461        let mut unstructured = Unstructured::new(&buf);
29462        Self::arbitrary(&mut unstructured).unwrap_or_default()
29463    }
29464}
29465impl Default for COMMAND_ACK_DATA {
29466    fn default() -> Self {
29467        Self::DEFAULT.clone()
29468    }
29469}
29470impl MessageData for COMMAND_ACK_DATA {
29471    type Message = MavMessage;
29472    const ID: u32 = 77u32;
29473    const NAME: &'static str = "COMMAND_ACK";
29474    const EXTRA_CRC: u8 = 143u8;
29475    const ENCODED_LEN: usize = 10usize;
29476    fn deser(
29477        _version: MavlinkVersion,
29478        __input: &[u8],
29479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29480        let avail_len = __input.len();
29481        let mut payload_buf = [0; Self::ENCODED_LEN];
29482        let mut buf = if avail_len < Self::ENCODED_LEN {
29483            payload_buf[0..avail_len].copy_from_slice(__input);
29484            Bytes::new(&payload_buf)
29485        } else {
29486            Bytes::new(__input)
29487        };
29488        let mut __struct = Self::default();
29489        let tmp = buf.get_u16_le();
29490        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
29491            ::mavlink_core::error::ParserError::InvalidEnum {
29492                enum_type: "MavCmd",
29493                value: tmp as u32,
29494            },
29495        )?;
29496        let tmp = buf.get_u8();
29497        __struct.result =
29498            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29499                enum_type: "MavResult",
29500                value: tmp as u32,
29501            })?;
29502        __struct.progress = buf.get_u8();
29503        __struct.result_param2 = buf.get_i32_le();
29504        __struct.target_system = buf.get_u8();
29505        __struct.target_component = buf.get_u8();
29506        Ok(__struct)
29507    }
29508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29509        let mut __tmp = BytesMut::new(bytes);
29510        #[allow(clippy::absurd_extreme_comparisons)]
29511        #[allow(unused_comparisons)]
29512        if __tmp.remaining() < Self::ENCODED_LEN {
29513            panic!(
29514                "buffer is too small (need {} bytes, but got {})",
29515                Self::ENCODED_LEN,
29516                __tmp.remaining(),
29517            )
29518        }
29519        __tmp.put_u16_le(self.command as u16);
29520        __tmp.put_u8(self.result as u8);
29521        __tmp.put_u8(self.progress);
29522        __tmp.put_i32_le(self.result_param2);
29523        __tmp.put_u8(self.target_system);
29524        __tmp.put_u8(self.target_component);
29525        if matches!(version, MavlinkVersion::V2) {
29526            let len = __tmp.len();
29527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29528        } else {
29529            __tmp.len()
29530        }
29531    }
29532}
29533#[doc = "id: 109"]
29534#[doc = "Status generated by radio and injected into MAVLink stream."]
29535#[derive(Debug, Clone, PartialEq)]
29536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29538pub struct RADIO_STATUS_DATA {
29539    #[doc = "Count of radio packet receive errors (since boot)."]
29540    pub rxerrors: u16,
29541    #[doc = "Count of error corrected radio packets (since boot)."]
29542    pub fixed: u16,
29543    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
29544    pub rssi: u8,
29545    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
29546    pub remrssi: u8,
29547    #[doc = "Remaining free transmitter buffer space."]
29548    pub txbuf: u8,
29549    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
29550    pub noise: u8,
29551    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
29552    pub remnoise: u8,
29553}
29554impl RADIO_STATUS_DATA {
29555    pub const ENCODED_LEN: usize = 9usize;
29556    pub const DEFAULT: Self = Self {
29557        rxerrors: 0_u16,
29558        fixed: 0_u16,
29559        rssi: 0_u8,
29560        remrssi: 0_u8,
29561        txbuf: 0_u8,
29562        noise: 0_u8,
29563        remnoise: 0_u8,
29564    };
29565    #[cfg(feature = "arbitrary")]
29566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29567        use arbitrary::{Arbitrary, Unstructured};
29568        let mut buf = [0u8; 1024];
29569        rng.fill_bytes(&mut buf);
29570        let mut unstructured = Unstructured::new(&buf);
29571        Self::arbitrary(&mut unstructured).unwrap_or_default()
29572    }
29573}
29574impl Default for RADIO_STATUS_DATA {
29575    fn default() -> Self {
29576        Self::DEFAULT.clone()
29577    }
29578}
29579impl MessageData for RADIO_STATUS_DATA {
29580    type Message = MavMessage;
29581    const ID: u32 = 109u32;
29582    const NAME: &'static str = "RADIO_STATUS";
29583    const EXTRA_CRC: u8 = 185u8;
29584    const ENCODED_LEN: usize = 9usize;
29585    fn deser(
29586        _version: MavlinkVersion,
29587        __input: &[u8],
29588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29589        let avail_len = __input.len();
29590        let mut payload_buf = [0; Self::ENCODED_LEN];
29591        let mut buf = if avail_len < Self::ENCODED_LEN {
29592            payload_buf[0..avail_len].copy_from_slice(__input);
29593            Bytes::new(&payload_buf)
29594        } else {
29595            Bytes::new(__input)
29596        };
29597        let mut __struct = Self::default();
29598        __struct.rxerrors = buf.get_u16_le();
29599        __struct.fixed = buf.get_u16_le();
29600        __struct.rssi = buf.get_u8();
29601        __struct.remrssi = buf.get_u8();
29602        __struct.txbuf = buf.get_u8();
29603        __struct.noise = buf.get_u8();
29604        __struct.remnoise = buf.get_u8();
29605        Ok(__struct)
29606    }
29607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29608        let mut __tmp = BytesMut::new(bytes);
29609        #[allow(clippy::absurd_extreme_comparisons)]
29610        #[allow(unused_comparisons)]
29611        if __tmp.remaining() < Self::ENCODED_LEN {
29612            panic!(
29613                "buffer is too small (need {} bytes, but got {})",
29614                Self::ENCODED_LEN,
29615                __tmp.remaining(),
29616            )
29617        }
29618        __tmp.put_u16_le(self.rxerrors);
29619        __tmp.put_u16_le(self.fixed);
29620        __tmp.put_u8(self.rssi);
29621        __tmp.put_u8(self.remrssi);
29622        __tmp.put_u8(self.txbuf);
29623        __tmp.put_u8(self.noise);
29624        __tmp.put_u8(self.remnoise);
29625        if matches!(version, MavlinkVersion::V2) {
29626            let len = __tmp.len();
29627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29628        } else {
29629            __tmp.len()
29630        }
29631    }
29632}
29633#[doc = "id: 284"]
29634#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
29635#[derive(Debug, Clone, PartialEq)]
29636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29638pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29639    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
29640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29641    pub q: [f32; 4],
29642    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
29643    pub angular_velocity_x: f32,
29644    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
29645    pub angular_velocity_y: f32,
29646    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
29647    pub angular_velocity_z: f32,
29648    #[doc = "Low level gimbal flags."]
29649    pub flags: GimbalDeviceFlags,
29650    #[doc = "System ID"]
29651    pub target_system: u8,
29652    #[doc = "Component ID"]
29653    pub target_component: u8,
29654}
29655impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29656    pub const ENCODED_LEN: usize = 32usize;
29657    pub const DEFAULT: Self = Self {
29658        q: [0.0_f32; 4usize],
29659        angular_velocity_x: 0.0_f32,
29660        angular_velocity_y: 0.0_f32,
29661        angular_velocity_z: 0.0_f32,
29662        flags: GimbalDeviceFlags::DEFAULT,
29663        target_system: 0_u8,
29664        target_component: 0_u8,
29665    };
29666    #[cfg(feature = "arbitrary")]
29667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29668        use arbitrary::{Arbitrary, Unstructured};
29669        let mut buf = [0u8; 1024];
29670        rng.fill_bytes(&mut buf);
29671        let mut unstructured = Unstructured::new(&buf);
29672        Self::arbitrary(&mut unstructured).unwrap_or_default()
29673    }
29674}
29675impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29676    fn default() -> Self {
29677        Self::DEFAULT.clone()
29678    }
29679}
29680impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
29681    type Message = MavMessage;
29682    const ID: u32 = 284u32;
29683    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
29684    const EXTRA_CRC: u8 = 99u8;
29685    const ENCODED_LEN: usize = 32usize;
29686    fn deser(
29687        _version: MavlinkVersion,
29688        __input: &[u8],
29689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29690        let avail_len = __input.len();
29691        let mut payload_buf = [0; Self::ENCODED_LEN];
29692        let mut buf = if avail_len < Self::ENCODED_LEN {
29693            payload_buf[0..avail_len].copy_from_slice(__input);
29694            Bytes::new(&payload_buf)
29695        } else {
29696            Bytes::new(__input)
29697        };
29698        let mut __struct = Self::default();
29699        for v in &mut __struct.q {
29700            let val = buf.get_f32_le();
29701            *v = val;
29702        }
29703        __struct.angular_velocity_x = buf.get_f32_le();
29704        __struct.angular_velocity_y = buf.get_f32_le();
29705        __struct.angular_velocity_z = buf.get_f32_le();
29706        let tmp = buf.get_u16_le();
29707        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
29708            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29709                flag_type: "GimbalDeviceFlags",
29710                value: tmp as u32,
29711            })?;
29712        __struct.target_system = buf.get_u8();
29713        __struct.target_component = buf.get_u8();
29714        Ok(__struct)
29715    }
29716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29717        let mut __tmp = BytesMut::new(bytes);
29718        #[allow(clippy::absurd_extreme_comparisons)]
29719        #[allow(unused_comparisons)]
29720        if __tmp.remaining() < Self::ENCODED_LEN {
29721            panic!(
29722                "buffer is too small (need {} bytes, but got {})",
29723                Self::ENCODED_LEN,
29724                __tmp.remaining(),
29725            )
29726        }
29727        for val in &self.q {
29728            __tmp.put_f32_le(*val);
29729        }
29730        __tmp.put_f32_le(self.angular_velocity_x);
29731        __tmp.put_f32_le(self.angular_velocity_y);
29732        __tmp.put_f32_le(self.angular_velocity_z);
29733        __tmp.put_u16_le(self.flags.bits());
29734        __tmp.put_u8(self.target_system);
29735        __tmp.put_u8(self.target_component);
29736        if matches!(version, MavlinkVersion::V2) {
29737            let len = __tmp.len();
29738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29739        } else {
29740            __tmp.len()
29741        }
29742    }
29743}
29744#[doc = "id: 32"]
29745#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
29746#[derive(Debug, Clone, PartialEq)]
29747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29749pub struct LOCAL_POSITION_NED_DATA {
29750    #[doc = "Timestamp (time since system boot)."]
29751    pub time_boot_ms: u32,
29752    #[doc = "X Position"]
29753    pub x: f32,
29754    #[doc = "Y Position"]
29755    pub y: f32,
29756    #[doc = "Z Position"]
29757    pub z: f32,
29758    #[doc = "X Speed"]
29759    pub vx: f32,
29760    #[doc = "Y Speed"]
29761    pub vy: f32,
29762    #[doc = "Z Speed"]
29763    pub vz: f32,
29764}
29765impl LOCAL_POSITION_NED_DATA {
29766    pub const ENCODED_LEN: usize = 28usize;
29767    pub const DEFAULT: Self = Self {
29768        time_boot_ms: 0_u32,
29769        x: 0.0_f32,
29770        y: 0.0_f32,
29771        z: 0.0_f32,
29772        vx: 0.0_f32,
29773        vy: 0.0_f32,
29774        vz: 0.0_f32,
29775    };
29776    #[cfg(feature = "arbitrary")]
29777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29778        use arbitrary::{Arbitrary, Unstructured};
29779        let mut buf = [0u8; 1024];
29780        rng.fill_bytes(&mut buf);
29781        let mut unstructured = Unstructured::new(&buf);
29782        Self::arbitrary(&mut unstructured).unwrap_or_default()
29783    }
29784}
29785impl Default for LOCAL_POSITION_NED_DATA {
29786    fn default() -> Self {
29787        Self::DEFAULT.clone()
29788    }
29789}
29790impl MessageData for LOCAL_POSITION_NED_DATA {
29791    type Message = MavMessage;
29792    const ID: u32 = 32u32;
29793    const NAME: &'static str = "LOCAL_POSITION_NED";
29794    const EXTRA_CRC: u8 = 185u8;
29795    const ENCODED_LEN: usize = 28usize;
29796    fn deser(
29797        _version: MavlinkVersion,
29798        __input: &[u8],
29799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29800        let avail_len = __input.len();
29801        let mut payload_buf = [0; Self::ENCODED_LEN];
29802        let mut buf = if avail_len < Self::ENCODED_LEN {
29803            payload_buf[0..avail_len].copy_from_slice(__input);
29804            Bytes::new(&payload_buf)
29805        } else {
29806            Bytes::new(__input)
29807        };
29808        let mut __struct = Self::default();
29809        __struct.time_boot_ms = buf.get_u32_le();
29810        __struct.x = buf.get_f32_le();
29811        __struct.y = buf.get_f32_le();
29812        __struct.z = buf.get_f32_le();
29813        __struct.vx = buf.get_f32_le();
29814        __struct.vy = buf.get_f32_le();
29815        __struct.vz = buf.get_f32_le();
29816        Ok(__struct)
29817    }
29818    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29819        let mut __tmp = BytesMut::new(bytes);
29820        #[allow(clippy::absurd_extreme_comparisons)]
29821        #[allow(unused_comparisons)]
29822        if __tmp.remaining() < Self::ENCODED_LEN {
29823            panic!(
29824                "buffer is too small (need {} bytes, but got {})",
29825                Self::ENCODED_LEN,
29826                __tmp.remaining(),
29827            )
29828        }
29829        __tmp.put_u32_le(self.time_boot_ms);
29830        __tmp.put_f32_le(self.x);
29831        __tmp.put_f32_le(self.y);
29832        __tmp.put_f32_le(self.z);
29833        __tmp.put_f32_le(self.vx);
29834        __tmp.put_f32_le(self.vy);
29835        __tmp.put_f32_le(self.vz);
29836        if matches!(version, MavlinkVersion::V2) {
29837            let len = __tmp.len();
29838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29839        } else {
29840            __tmp.len()
29841        }
29842    }
29843}
29844#[doc = "id: 11"]
29845#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
29846#[derive(Debug, Clone, PartialEq)]
29847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29849pub struct SET_MODE_DATA {
29850    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
29851    pub custom_mode: u32,
29852    #[doc = "The system setting the mode"]
29853    pub target_system: u8,
29854    #[doc = "The new base mode."]
29855    pub base_mode: MavMode,
29856}
29857impl SET_MODE_DATA {
29858    pub const ENCODED_LEN: usize = 6usize;
29859    pub const DEFAULT: Self = Self {
29860        custom_mode: 0_u32,
29861        target_system: 0_u8,
29862        base_mode: MavMode::DEFAULT,
29863    };
29864    #[cfg(feature = "arbitrary")]
29865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29866        use arbitrary::{Arbitrary, Unstructured};
29867        let mut buf = [0u8; 1024];
29868        rng.fill_bytes(&mut buf);
29869        let mut unstructured = Unstructured::new(&buf);
29870        Self::arbitrary(&mut unstructured).unwrap_or_default()
29871    }
29872}
29873impl Default for SET_MODE_DATA {
29874    fn default() -> Self {
29875        Self::DEFAULT.clone()
29876    }
29877}
29878impl MessageData for SET_MODE_DATA {
29879    type Message = MavMessage;
29880    const ID: u32 = 11u32;
29881    const NAME: &'static str = "SET_MODE";
29882    const EXTRA_CRC: u8 = 89u8;
29883    const ENCODED_LEN: usize = 6usize;
29884    fn deser(
29885        _version: MavlinkVersion,
29886        __input: &[u8],
29887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29888        let avail_len = __input.len();
29889        let mut payload_buf = [0; Self::ENCODED_LEN];
29890        let mut buf = if avail_len < Self::ENCODED_LEN {
29891            payload_buf[0..avail_len].copy_from_slice(__input);
29892            Bytes::new(&payload_buf)
29893        } else {
29894            Bytes::new(__input)
29895        };
29896        let mut __struct = Self::default();
29897        __struct.custom_mode = buf.get_u32_le();
29898        __struct.target_system = buf.get_u8();
29899        let tmp = buf.get_u8();
29900        __struct.base_mode =
29901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29902                enum_type: "MavMode",
29903                value: tmp as u32,
29904            })?;
29905        Ok(__struct)
29906    }
29907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29908        let mut __tmp = BytesMut::new(bytes);
29909        #[allow(clippy::absurd_extreme_comparisons)]
29910        #[allow(unused_comparisons)]
29911        if __tmp.remaining() < Self::ENCODED_LEN {
29912            panic!(
29913                "buffer is too small (need {} bytes, but got {})",
29914                Self::ENCODED_LEN,
29915                __tmp.remaining(),
29916            )
29917        }
29918        __tmp.put_u32_le(self.custom_mode);
29919        __tmp.put_u8(self.target_system);
29920        __tmp.put_u8(self.base_mode as u8);
29921        if matches!(version, MavlinkVersion::V2) {
29922            let len = __tmp.len();
29923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29924        } else {
29925            __tmp.len()
29926        }
29927    }
29928}
29929#[doc = "id: 285"]
29930#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
29931#[derive(Debug, Clone, PartialEq)]
29932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29934pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29935    #[doc = "Timestamp (time since system boot)."]
29936    pub time_boot_ms: u32,
29937    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
29938    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29939    pub q: [f32; 4],
29940    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
29941    pub angular_velocity_x: f32,
29942    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
29943    pub angular_velocity_y: f32,
29944    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
29945    pub angular_velocity_z: f32,
29946    #[doc = "Failure flags (0 for no failure)"]
29947    pub failure_flags: GimbalDeviceErrorFlags,
29948    #[doc = "Current gimbal flags set."]
29949    pub flags: GimbalDeviceFlags,
29950    #[doc = "System ID"]
29951    pub target_system: u8,
29952    #[doc = "Component ID"]
29953    pub target_component: u8,
29954    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
29955    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29956    pub delta_yaw: f32,
29957    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
29958    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29959    pub delta_yaw_velocity: f32,
29960    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
29961    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29962    pub gimbal_device_id: u8,
29963}
29964impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29965    pub const ENCODED_LEN: usize = 49usize;
29966    pub const DEFAULT: Self = Self {
29967        time_boot_ms: 0_u32,
29968        q: [0.0_f32; 4usize],
29969        angular_velocity_x: 0.0_f32,
29970        angular_velocity_y: 0.0_f32,
29971        angular_velocity_z: 0.0_f32,
29972        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
29973        flags: GimbalDeviceFlags::DEFAULT,
29974        target_system: 0_u8,
29975        target_component: 0_u8,
29976        delta_yaw: 0.0_f32,
29977        delta_yaw_velocity: 0.0_f32,
29978        gimbal_device_id: 0_u8,
29979    };
29980    #[cfg(feature = "arbitrary")]
29981    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29982        use arbitrary::{Arbitrary, Unstructured};
29983        let mut buf = [0u8; 1024];
29984        rng.fill_bytes(&mut buf);
29985        let mut unstructured = Unstructured::new(&buf);
29986        Self::arbitrary(&mut unstructured).unwrap_or_default()
29987    }
29988}
29989impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29990    fn default() -> Self {
29991        Self::DEFAULT.clone()
29992    }
29993}
29994impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
29995    type Message = MavMessage;
29996    const ID: u32 = 285u32;
29997    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
29998    const EXTRA_CRC: u8 = 137u8;
29999    const ENCODED_LEN: usize = 49usize;
30000    fn deser(
30001        _version: MavlinkVersion,
30002        __input: &[u8],
30003    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30004        let avail_len = __input.len();
30005        let mut payload_buf = [0; Self::ENCODED_LEN];
30006        let mut buf = if avail_len < Self::ENCODED_LEN {
30007            payload_buf[0..avail_len].copy_from_slice(__input);
30008            Bytes::new(&payload_buf)
30009        } else {
30010            Bytes::new(__input)
30011        };
30012        let mut __struct = Self::default();
30013        __struct.time_boot_ms = buf.get_u32_le();
30014        for v in &mut __struct.q {
30015            let val = buf.get_f32_le();
30016            *v = val;
30017        }
30018        __struct.angular_velocity_x = buf.get_f32_le();
30019        __struct.angular_velocity_y = buf.get_f32_le();
30020        __struct.angular_velocity_z = buf.get_f32_le();
30021        let tmp = buf.get_u32_le();
30022        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
30023            tmp & GimbalDeviceErrorFlags::all().bits(),
30024        )
30025        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30026            flag_type: "GimbalDeviceErrorFlags",
30027            value: tmp as u32,
30028        })?;
30029        let tmp = buf.get_u16_le();
30030        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
30031            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30032                flag_type: "GimbalDeviceFlags",
30033                value: tmp as u32,
30034            })?;
30035        __struct.target_system = buf.get_u8();
30036        __struct.target_component = buf.get_u8();
30037        __struct.delta_yaw = buf.get_f32_le();
30038        __struct.delta_yaw_velocity = buf.get_f32_le();
30039        __struct.gimbal_device_id = buf.get_u8();
30040        Ok(__struct)
30041    }
30042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30043        let mut __tmp = BytesMut::new(bytes);
30044        #[allow(clippy::absurd_extreme_comparisons)]
30045        #[allow(unused_comparisons)]
30046        if __tmp.remaining() < Self::ENCODED_LEN {
30047            panic!(
30048                "buffer is too small (need {} bytes, but got {})",
30049                Self::ENCODED_LEN,
30050                __tmp.remaining(),
30051            )
30052        }
30053        __tmp.put_u32_le(self.time_boot_ms);
30054        for val in &self.q {
30055            __tmp.put_f32_le(*val);
30056        }
30057        __tmp.put_f32_le(self.angular_velocity_x);
30058        __tmp.put_f32_le(self.angular_velocity_y);
30059        __tmp.put_f32_le(self.angular_velocity_z);
30060        __tmp.put_u32_le(self.failure_flags.bits());
30061        __tmp.put_u16_le(self.flags.bits());
30062        __tmp.put_u8(self.target_system);
30063        __tmp.put_u8(self.target_component);
30064        __tmp.put_f32_le(self.delta_yaw);
30065        __tmp.put_f32_le(self.delta_yaw_velocity);
30066        __tmp.put_u8(self.gimbal_device_id);
30067        if matches!(version, MavlinkVersion::V2) {
30068            let len = __tmp.len();
30069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30070        } else {
30071            __tmp.len()
30072        }
30073    }
30074}
30075#[doc = "id: 143"]
30076#[doc = "Barometer readings for 3rd barometer."]
30077#[derive(Debug, Clone, PartialEq)]
30078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30080pub struct SCALED_PRESSURE3_DATA {
30081    #[doc = "Timestamp (time since system boot)."]
30082    pub time_boot_ms: u32,
30083    #[doc = "Absolute pressure"]
30084    pub press_abs: f32,
30085    #[doc = "Differential pressure"]
30086    pub press_diff: f32,
30087    #[doc = "Absolute pressure temperature"]
30088    pub temperature: i16,
30089    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
30090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30091    pub temperature_press_diff: i16,
30092}
30093impl SCALED_PRESSURE3_DATA {
30094    pub const ENCODED_LEN: usize = 16usize;
30095    pub const DEFAULT: Self = Self {
30096        time_boot_ms: 0_u32,
30097        press_abs: 0.0_f32,
30098        press_diff: 0.0_f32,
30099        temperature: 0_i16,
30100        temperature_press_diff: 0_i16,
30101    };
30102    #[cfg(feature = "arbitrary")]
30103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30104        use arbitrary::{Arbitrary, Unstructured};
30105        let mut buf = [0u8; 1024];
30106        rng.fill_bytes(&mut buf);
30107        let mut unstructured = Unstructured::new(&buf);
30108        Self::arbitrary(&mut unstructured).unwrap_or_default()
30109    }
30110}
30111impl Default for SCALED_PRESSURE3_DATA {
30112    fn default() -> Self {
30113        Self::DEFAULT.clone()
30114    }
30115}
30116impl MessageData for SCALED_PRESSURE3_DATA {
30117    type Message = MavMessage;
30118    const ID: u32 = 143u32;
30119    const NAME: &'static str = "SCALED_PRESSURE3";
30120    const EXTRA_CRC: u8 = 131u8;
30121    const ENCODED_LEN: usize = 16usize;
30122    fn deser(
30123        _version: MavlinkVersion,
30124        __input: &[u8],
30125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30126        let avail_len = __input.len();
30127        let mut payload_buf = [0; Self::ENCODED_LEN];
30128        let mut buf = if avail_len < Self::ENCODED_LEN {
30129            payload_buf[0..avail_len].copy_from_slice(__input);
30130            Bytes::new(&payload_buf)
30131        } else {
30132            Bytes::new(__input)
30133        };
30134        let mut __struct = Self::default();
30135        __struct.time_boot_ms = buf.get_u32_le();
30136        __struct.press_abs = buf.get_f32_le();
30137        __struct.press_diff = buf.get_f32_le();
30138        __struct.temperature = buf.get_i16_le();
30139        __struct.temperature_press_diff = buf.get_i16_le();
30140        Ok(__struct)
30141    }
30142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30143        let mut __tmp = BytesMut::new(bytes);
30144        #[allow(clippy::absurd_extreme_comparisons)]
30145        #[allow(unused_comparisons)]
30146        if __tmp.remaining() < Self::ENCODED_LEN {
30147            panic!(
30148                "buffer is too small (need {} bytes, but got {})",
30149                Self::ENCODED_LEN,
30150                __tmp.remaining(),
30151            )
30152        }
30153        __tmp.put_u32_le(self.time_boot_ms);
30154        __tmp.put_f32_le(self.press_abs);
30155        __tmp.put_f32_le(self.press_diff);
30156        __tmp.put_i16_le(self.temperature);
30157        __tmp.put_i16_le(self.temperature_press_diff);
30158        if matches!(version, MavlinkVersion::V2) {
30159            let len = __tmp.len();
30160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30161        } else {
30162            __tmp.len()
30163        }
30164    }
30165}
30166#[doc = "id: 251"]
30167#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
30168#[derive(Debug, Clone, PartialEq)]
30169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30171pub struct NAMED_VALUE_FLOAT_DATA {
30172    #[doc = "Timestamp (time since system boot)."]
30173    pub time_boot_ms: u32,
30174    #[doc = "Floating point value"]
30175    pub value: f32,
30176    #[doc = "Name of the debug variable"]
30177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30178    pub name: [u8; 10],
30179}
30180impl NAMED_VALUE_FLOAT_DATA {
30181    pub const ENCODED_LEN: usize = 18usize;
30182    pub const DEFAULT: Self = Self {
30183        time_boot_ms: 0_u32,
30184        value: 0.0_f32,
30185        name: [0_u8; 10usize],
30186    };
30187    #[cfg(feature = "arbitrary")]
30188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30189        use arbitrary::{Arbitrary, Unstructured};
30190        let mut buf = [0u8; 1024];
30191        rng.fill_bytes(&mut buf);
30192        let mut unstructured = Unstructured::new(&buf);
30193        Self::arbitrary(&mut unstructured).unwrap_or_default()
30194    }
30195}
30196impl Default for NAMED_VALUE_FLOAT_DATA {
30197    fn default() -> Self {
30198        Self::DEFAULT.clone()
30199    }
30200}
30201impl MessageData for NAMED_VALUE_FLOAT_DATA {
30202    type Message = MavMessage;
30203    const ID: u32 = 251u32;
30204    const NAME: &'static str = "NAMED_VALUE_FLOAT";
30205    const EXTRA_CRC: u8 = 170u8;
30206    const ENCODED_LEN: usize = 18usize;
30207    fn deser(
30208        _version: MavlinkVersion,
30209        __input: &[u8],
30210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30211        let avail_len = __input.len();
30212        let mut payload_buf = [0; Self::ENCODED_LEN];
30213        let mut buf = if avail_len < Self::ENCODED_LEN {
30214            payload_buf[0..avail_len].copy_from_slice(__input);
30215            Bytes::new(&payload_buf)
30216        } else {
30217            Bytes::new(__input)
30218        };
30219        let mut __struct = Self::default();
30220        __struct.time_boot_ms = buf.get_u32_le();
30221        __struct.value = buf.get_f32_le();
30222        for v in &mut __struct.name {
30223            let val = buf.get_u8();
30224            *v = val;
30225        }
30226        Ok(__struct)
30227    }
30228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30229        let mut __tmp = BytesMut::new(bytes);
30230        #[allow(clippy::absurd_extreme_comparisons)]
30231        #[allow(unused_comparisons)]
30232        if __tmp.remaining() < Self::ENCODED_LEN {
30233            panic!(
30234                "buffer is too small (need {} bytes, but got {})",
30235                Self::ENCODED_LEN,
30236                __tmp.remaining(),
30237            )
30238        }
30239        __tmp.put_u32_le(self.time_boot_ms);
30240        __tmp.put_f32_le(self.value);
30241        for val in &self.name {
30242            __tmp.put_u8(*val);
30243        }
30244        if matches!(version, MavlinkVersion::V2) {
30245            let len = __tmp.len();
30246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30247        } else {
30248            __tmp.len()
30249        }
30250    }
30251}
30252#[doc = "id: 110"]
30253#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
30254#[derive(Debug, Clone, PartialEq)]
30255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30257pub struct FILE_TRANSFER_PROTOCOL_DATA {
30258    #[doc = "Network ID (0 for broadcast)"]
30259    pub target_network: u8,
30260    #[doc = "System ID (0 for broadcast)"]
30261    pub target_system: u8,
30262    #[doc = "Component ID (0 for broadcast)"]
30263    pub target_component: u8,
30264    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
30265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30266    pub payload: [u8; 251],
30267}
30268impl FILE_TRANSFER_PROTOCOL_DATA {
30269    pub const ENCODED_LEN: usize = 254usize;
30270    pub const DEFAULT: Self = Self {
30271        target_network: 0_u8,
30272        target_system: 0_u8,
30273        target_component: 0_u8,
30274        payload: [0_u8; 251usize],
30275    };
30276    #[cfg(feature = "arbitrary")]
30277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30278        use arbitrary::{Arbitrary, Unstructured};
30279        let mut buf = [0u8; 1024];
30280        rng.fill_bytes(&mut buf);
30281        let mut unstructured = Unstructured::new(&buf);
30282        Self::arbitrary(&mut unstructured).unwrap_or_default()
30283    }
30284}
30285impl Default for FILE_TRANSFER_PROTOCOL_DATA {
30286    fn default() -> Self {
30287        Self::DEFAULT.clone()
30288    }
30289}
30290impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
30291    type Message = MavMessage;
30292    const ID: u32 = 110u32;
30293    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
30294    const EXTRA_CRC: u8 = 84u8;
30295    const ENCODED_LEN: usize = 254usize;
30296    fn deser(
30297        _version: MavlinkVersion,
30298        __input: &[u8],
30299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30300        let avail_len = __input.len();
30301        let mut payload_buf = [0; Self::ENCODED_LEN];
30302        let mut buf = if avail_len < Self::ENCODED_LEN {
30303            payload_buf[0..avail_len].copy_from_slice(__input);
30304            Bytes::new(&payload_buf)
30305        } else {
30306            Bytes::new(__input)
30307        };
30308        let mut __struct = Self::default();
30309        __struct.target_network = buf.get_u8();
30310        __struct.target_system = buf.get_u8();
30311        __struct.target_component = buf.get_u8();
30312        for v in &mut __struct.payload {
30313            let val = buf.get_u8();
30314            *v = val;
30315        }
30316        Ok(__struct)
30317    }
30318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30319        let mut __tmp = BytesMut::new(bytes);
30320        #[allow(clippy::absurd_extreme_comparisons)]
30321        #[allow(unused_comparisons)]
30322        if __tmp.remaining() < Self::ENCODED_LEN {
30323            panic!(
30324                "buffer is too small (need {} bytes, but got {})",
30325                Self::ENCODED_LEN,
30326                __tmp.remaining(),
30327            )
30328        }
30329        __tmp.put_u8(self.target_network);
30330        __tmp.put_u8(self.target_system);
30331        __tmp.put_u8(self.target_component);
30332        for val in &self.payload {
30333            __tmp.put_u8(*val);
30334        }
30335        if matches!(version, MavlinkVersion::V2) {
30336            let len = __tmp.len();
30337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30338        } else {
30339            __tmp.len()
30340        }
30341    }
30342}
30343#[doc = "id: 137"]
30344#[doc = "Barometer readings for 2nd barometer."]
30345#[derive(Debug, Clone, PartialEq)]
30346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30348pub struct SCALED_PRESSURE2_DATA {
30349    #[doc = "Timestamp (time since system boot)."]
30350    pub time_boot_ms: u32,
30351    #[doc = "Absolute pressure"]
30352    pub press_abs: f32,
30353    #[doc = "Differential pressure"]
30354    pub press_diff: f32,
30355    #[doc = "Absolute pressure temperature"]
30356    pub temperature: i16,
30357    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
30358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30359    pub temperature_press_diff: i16,
30360}
30361impl SCALED_PRESSURE2_DATA {
30362    pub const ENCODED_LEN: usize = 16usize;
30363    pub const DEFAULT: Self = Self {
30364        time_boot_ms: 0_u32,
30365        press_abs: 0.0_f32,
30366        press_diff: 0.0_f32,
30367        temperature: 0_i16,
30368        temperature_press_diff: 0_i16,
30369    };
30370    #[cfg(feature = "arbitrary")]
30371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30372        use arbitrary::{Arbitrary, Unstructured};
30373        let mut buf = [0u8; 1024];
30374        rng.fill_bytes(&mut buf);
30375        let mut unstructured = Unstructured::new(&buf);
30376        Self::arbitrary(&mut unstructured).unwrap_or_default()
30377    }
30378}
30379impl Default for SCALED_PRESSURE2_DATA {
30380    fn default() -> Self {
30381        Self::DEFAULT.clone()
30382    }
30383}
30384impl MessageData for SCALED_PRESSURE2_DATA {
30385    type Message = MavMessage;
30386    const ID: u32 = 137u32;
30387    const NAME: &'static str = "SCALED_PRESSURE2";
30388    const EXTRA_CRC: u8 = 195u8;
30389    const ENCODED_LEN: usize = 16usize;
30390    fn deser(
30391        _version: MavlinkVersion,
30392        __input: &[u8],
30393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30394        let avail_len = __input.len();
30395        let mut payload_buf = [0; Self::ENCODED_LEN];
30396        let mut buf = if avail_len < Self::ENCODED_LEN {
30397            payload_buf[0..avail_len].copy_from_slice(__input);
30398            Bytes::new(&payload_buf)
30399        } else {
30400            Bytes::new(__input)
30401        };
30402        let mut __struct = Self::default();
30403        __struct.time_boot_ms = buf.get_u32_le();
30404        __struct.press_abs = buf.get_f32_le();
30405        __struct.press_diff = buf.get_f32_le();
30406        __struct.temperature = buf.get_i16_le();
30407        __struct.temperature_press_diff = buf.get_i16_le();
30408        Ok(__struct)
30409    }
30410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30411        let mut __tmp = BytesMut::new(bytes);
30412        #[allow(clippy::absurd_extreme_comparisons)]
30413        #[allow(unused_comparisons)]
30414        if __tmp.remaining() < Self::ENCODED_LEN {
30415            panic!(
30416                "buffer is too small (need {} bytes, but got {})",
30417                Self::ENCODED_LEN,
30418                __tmp.remaining(),
30419            )
30420        }
30421        __tmp.put_u32_le(self.time_boot_ms);
30422        __tmp.put_f32_le(self.press_abs);
30423        __tmp.put_f32_le(self.press_diff);
30424        __tmp.put_i16_le(self.temperature);
30425        __tmp.put_i16_le(self.temperature_press_diff);
30426        if matches!(version, MavlinkVersion::V2) {
30427            let len = __tmp.len();
30428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30429        } else {
30430            __tmp.len()
30431        }
30432    }
30433}
30434#[doc = "id: 100"]
30435#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
30436#[derive(Debug, Clone, PartialEq)]
30437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30439pub struct OPTICAL_FLOW_DATA {
30440    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30441    pub time_usec: u64,
30442    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
30443    pub flow_comp_m_x: f32,
30444    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
30445    pub flow_comp_m_y: f32,
30446    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
30447    pub ground_distance: f32,
30448    #[doc = "Flow in x-sensor direction"]
30449    pub flow_x: i16,
30450    #[doc = "Flow in y-sensor direction"]
30451    pub flow_y: i16,
30452    #[doc = "Sensor ID"]
30453    pub sensor_id: u8,
30454    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
30455    pub quality: u8,
30456    #[doc = "Flow rate about X axis"]
30457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30458    pub flow_rate_x: f32,
30459    #[doc = "Flow rate about Y axis"]
30460    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30461    pub flow_rate_y: f32,
30462}
30463impl OPTICAL_FLOW_DATA {
30464    pub const ENCODED_LEN: usize = 34usize;
30465    pub const DEFAULT: Self = Self {
30466        time_usec: 0_u64,
30467        flow_comp_m_x: 0.0_f32,
30468        flow_comp_m_y: 0.0_f32,
30469        ground_distance: 0.0_f32,
30470        flow_x: 0_i16,
30471        flow_y: 0_i16,
30472        sensor_id: 0_u8,
30473        quality: 0_u8,
30474        flow_rate_x: 0.0_f32,
30475        flow_rate_y: 0.0_f32,
30476    };
30477    #[cfg(feature = "arbitrary")]
30478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30479        use arbitrary::{Arbitrary, Unstructured};
30480        let mut buf = [0u8; 1024];
30481        rng.fill_bytes(&mut buf);
30482        let mut unstructured = Unstructured::new(&buf);
30483        Self::arbitrary(&mut unstructured).unwrap_or_default()
30484    }
30485}
30486impl Default for OPTICAL_FLOW_DATA {
30487    fn default() -> Self {
30488        Self::DEFAULT.clone()
30489    }
30490}
30491impl MessageData for OPTICAL_FLOW_DATA {
30492    type Message = MavMessage;
30493    const ID: u32 = 100u32;
30494    const NAME: &'static str = "OPTICAL_FLOW";
30495    const EXTRA_CRC: u8 = 175u8;
30496    const ENCODED_LEN: usize = 34usize;
30497    fn deser(
30498        _version: MavlinkVersion,
30499        __input: &[u8],
30500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30501        let avail_len = __input.len();
30502        let mut payload_buf = [0; Self::ENCODED_LEN];
30503        let mut buf = if avail_len < Self::ENCODED_LEN {
30504            payload_buf[0..avail_len].copy_from_slice(__input);
30505            Bytes::new(&payload_buf)
30506        } else {
30507            Bytes::new(__input)
30508        };
30509        let mut __struct = Self::default();
30510        __struct.time_usec = buf.get_u64_le();
30511        __struct.flow_comp_m_x = buf.get_f32_le();
30512        __struct.flow_comp_m_y = buf.get_f32_le();
30513        __struct.ground_distance = buf.get_f32_le();
30514        __struct.flow_x = buf.get_i16_le();
30515        __struct.flow_y = buf.get_i16_le();
30516        __struct.sensor_id = buf.get_u8();
30517        __struct.quality = buf.get_u8();
30518        __struct.flow_rate_x = buf.get_f32_le();
30519        __struct.flow_rate_y = buf.get_f32_le();
30520        Ok(__struct)
30521    }
30522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30523        let mut __tmp = BytesMut::new(bytes);
30524        #[allow(clippy::absurd_extreme_comparisons)]
30525        #[allow(unused_comparisons)]
30526        if __tmp.remaining() < Self::ENCODED_LEN {
30527            panic!(
30528                "buffer is too small (need {} bytes, but got {})",
30529                Self::ENCODED_LEN,
30530                __tmp.remaining(),
30531            )
30532        }
30533        __tmp.put_u64_le(self.time_usec);
30534        __tmp.put_f32_le(self.flow_comp_m_x);
30535        __tmp.put_f32_le(self.flow_comp_m_y);
30536        __tmp.put_f32_le(self.ground_distance);
30537        __tmp.put_i16_le(self.flow_x);
30538        __tmp.put_i16_le(self.flow_y);
30539        __tmp.put_u8(self.sensor_id);
30540        __tmp.put_u8(self.quality);
30541        __tmp.put_f32_le(self.flow_rate_x);
30542        __tmp.put_f32_le(self.flow_rate_y);
30543        if matches!(version, MavlinkVersion::V2) {
30544            let len = __tmp.len();
30545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30546        } else {
30547            __tmp.len()
30548        }
30549    }
30550}
30551#[doc = "id: 147"]
30552#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
30553#[derive(Debug, Clone, PartialEq)]
30554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30556pub struct BATTERY_STATUS_DATA {
30557    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
30558    pub current_consumed: i32,
30559    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
30560    pub energy_consumed: i32,
30561    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
30562    pub temperature: i16,
30563    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
30564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30565    pub voltages: [u16; 10],
30566    #[doc = "Battery current, -1: autopilot does not measure the current"]
30567    pub current_battery: i16,
30568    #[doc = "Battery ID"]
30569    pub id: u8,
30570    #[doc = "Function of the battery"]
30571    pub battery_function: MavBatteryFunction,
30572    #[doc = "Type (chemistry) of the battery"]
30573    pub mavtype: MavBatteryType,
30574    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
30575    pub battery_remaining: i8,
30576    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
30577    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30578    pub time_remaining: i32,
30579    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
30580    #[cfg_attr(feature = "serde", serde(default))]
30581    pub charge_state: MavBatteryChargeState,
30582    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
30583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30584    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30585    pub voltages_ext: [u16; 4],
30586    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
30587    #[cfg_attr(feature = "serde", serde(default))]
30588    pub mode: MavBatteryMode,
30589    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
30590    #[cfg_attr(feature = "serde", serde(default))]
30591    pub fault_bitmask: MavBatteryFault,
30592}
30593impl BATTERY_STATUS_DATA {
30594    pub const ENCODED_LEN: usize = 54usize;
30595    pub const DEFAULT: Self = Self {
30596        current_consumed: 0_i32,
30597        energy_consumed: 0_i32,
30598        temperature: 0_i16,
30599        voltages: [0_u16; 10usize],
30600        current_battery: 0_i16,
30601        id: 0_u8,
30602        battery_function: MavBatteryFunction::DEFAULT,
30603        mavtype: MavBatteryType::DEFAULT,
30604        battery_remaining: 0_i8,
30605        time_remaining: 0_i32,
30606        charge_state: MavBatteryChargeState::DEFAULT,
30607        voltages_ext: [0_u16; 4usize],
30608        mode: MavBatteryMode::DEFAULT,
30609        fault_bitmask: MavBatteryFault::DEFAULT,
30610    };
30611    #[cfg(feature = "arbitrary")]
30612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30613        use arbitrary::{Arbitrary, Unstructured};
30614        let mut buf = [0u8; 1024];
30615        rng.fill_bytes(&mut buf);
30616        let mut unstructured = Unstructured::new(&buf);
30617        Self::arbitrary(&mut unstructured).unwrap_or_default()
30618    }
30619}
30620impl Default for BATTERY_STATUS_DATA {
30621    fn default() -> Self {
30622        Self::DEFAULT.clone()
30623    }
30624}
30625impl MessageData for BATTERY_STATUS_DATA {
30626    type Message = MavMessage;
30627    const ID: u32 = 147u32;
30628    const NAME: &'static str = "BATTERY_STATUS";
30629    const EXTRA_CRC: u8 = 154u8;
30630    const ENCODED_LEN: usize = 54usize;
30631    fn deser(
30632        _version: MavlinkVersion,
30633        __input: &[u8],
30634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30635        let avail_len = __input.len();
30636        let mut payload_buf = [0; Self::ENCODED_LEN];
30637        let mut buf = if avail_len < Self::ENCODED_LEN {
30638            payload_buf[0..avail_len].copy_from_slice(__input);
30639            Bytes::new(&payload_buf)
30640        } else {
30641            Bytes::new(__input)
30642        };
30643        let mut __struct = Self::default();
30644        __struct.current_consumed = buf.get_i32_le();
30645        __struct.energy_consumed = buf.get_i32_le();
30646        __struct.temperature = buf.get_i16_le();
30647        for v in &mut __struct.voltages {
30648            let val = buf.get_u16_le();
30649            *v = val;
30650        }
30651        __struct.current_battery = buf.get_i16_le();
30652        __struct.id = buf.get_u8();
30653        let tmp = buf.get_u8();
30654        __struct.battery_function =
30655            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30656                enum_type: "MavBatteryFunction",
30657                value: tmp as u32,
30658            })?;
30659        let tmp = buf.get_u8();
30660        __struct.mavtype =
30661            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30662                enum_type: "MavBatteryType",
30663                value: tmp as u32,
30664            })?;
30665        __struct.battery_remaining = buf.get_i8();
30666        __struct.time_remaining = buf.get_i32_le();
30667        let tmp = buf.get_u8();
30668        __struct.charge_state =
30669            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30670                enum_type: "MavBatteryChargeState",
30671                value: tmp as u32,
30672            })?;
30673        for v in &mut __struct.voltages_ext {
30674            let val = buf.get_u16_le();
30675            *v = val;
30676        }
30677        let tmp = buf.get_u8();
30678        __struct.mode =
30679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30680                enum_type: "MavBatteryMode",
30681                value: tmp as u32,
30682            })?;
30683        let tmp = buf.get_u32_le();
30684        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
30685            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30686                flag_type: "MavBatteryFault",
30687                value: tmp as u32,
30688            })?;
30689        Ok(__struct)
30690    }
30691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30692        let mut __tmp = BytesMut::new(bytes);
30693        #[allow(clippy::absurd_extreme_comparisons)]
30694        #[allow(unused_comparisons)]
30695        if __tmp.remaining() < Self::ENCODED_LEN {
30696            panic!(
30697                "buffer is too small (need {} bytes, but got {})",
30698                Self::ENCODED_LEN,
30699                __tmp.remaining(),
30700            )
30701        }
30702        __tmp.put_i32_le(self.current_consumed);
30703        __tmp.put_i32_le(self.energy_consumed);
30704        __tmp.put_i16_le(self.temperature);
30705        for val in &self.voltages {
30706            __tmp.put_u16_le(*val);
30707        }
30708        __tmp.put_i16_le(self.current_battery);
30709        __tmp.put_u8(self.id);
30710        __tmp.put_u8(self.battery_function as u8);
30711        __tmp.put_u8(self.mavtype as u8);
30712        __tmp.put_i8(self.battery_remaining);
30713        __tmp.put_i32_le(self.time_remaining);
30714        __tmp.put_u8(self.charge_state as u8);
30715        for val in &self.voltages_ext {
30716            __tmp.put_u16_le(*val);
30717        }
30718        __tmp.put_u8(self.mode as u8);
30719        __tmp.put_u32_le(self.fault_bitmask.bits());
30720        if matches!(version, MavlinkVersion::V2) {
30721            let len = __tmp.len();
30722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30723        } else {
30724            __tmp.len()
30725        }
30726    }
30727}
30728#[doc = "id: 75"]
30729#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
30730#[derive(Debug, Clone, PartialEq)]
30731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30733pub struct COMMAND_INT_DATA {
30734    #[doc = "PARAM1, see MAV_CMD enum"]
30735    pub param1: f32,
30736    #[doc = "PARAM2, see MAV_CMD enum"]
30737    pub param2: f32,
30738    #[doc = "PARAM3, see MAV_CMD enum"]
30739    pub param3: f32,
30740    #[doc = "PARAM4, see MAV_CMD enum"]
30741    pub param4: f32,
30742    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
30743    pub x: i32,
30744    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
30745    pub y: i32,
30746    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
30747    pub z: f32,
30748    #[doc = "The scheduled action for the mission item."]
30749    pub command: MavCmd,
30750    #[doc = "System ID"]
30751    pub target_system: u8,
30752    #[doc = "Component ID"]
30753    pub target_component: u8,
30754    #[doc = "The coordinate system of the COMMAND."]
30755    pub frame: MavFrame,
30756    #[doc = "Not used."]
30757    pub current: u8,
30758    #[doc = "Not used (set 0)."]
30759    pub autocontinue: u8,
30760}
30761impl COMMAND_INT_DATA {
30762    pub const ENCODED_LEN: usize = 35usize;
30763    pub const DEFAULT: Self = Self {
30764        param1: 0.0_f32,
30765        param2: 0.0_f32,
30766        param3: 0.0_f32,
30767        param4: 0.0_f32,
30768        x: 0_i32,
30769        y: 0_i32,
30770        z: 0.0_f32,
30771        command: MavCmd::DEFAULT,
30772        target_system: 0_u8,
30773        target_component: 0_u8,
30774        frame: MavFrame::DEFAULT,
30775        current: 0_u8,
30776        autocontinue: 0_u8,
30777    };
30778    #[cfg(feature = "arbitrary")]
30779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30780        use arbitrary::{Arbitrary, Unstructured};
30781        let mut buf = [0u8; 1024];
30782        rng.fill_bytes(&mut buf);
30783        let mut unstructured = Unstructured::new(&buf);
30784        Self::arbitrary(&mut unstructured).unwrap_or_default()
30785    }
30786}
30787impl Default for COMMAND_INT_DATA {
30788    fn default() -> Self {
30789        Self::DEFAULT.clone()
30790    }
30791}
30792impl MessageData for COMMAND_INT_DATA {
30793    type Message = MavMessage;
30794    const ID: u32 = 75u32;
30795    const NAME: &'static str = "COMMAND_INT";
30796    const EXTRA_CRC: u8 = 158u8;
30797    const ENCODED_LEN: usize = 35usize;
30798    fn deser(
30799        _version: MavlinkVersion,
30800        __input: &[u8],
30801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30802        let avail_len = __input.len();
30803        let mut payload_buf = [0; Self::ENCODED_LEN];
30804        let mut buf = if avail_len < Self::ENCODED_LEN {
30805            payload_buf[0..avail_len].copy_from_slice(__input);
30806            Bytes::new(&payload_buf)
30807        } else {
30808            Bytes::new(__input)
30809        };
30810        let mut __struct = Self::default();
30811        __struct.param1 = buf.get_f32_le();
30812        __struct.param2 = buf.get_f32_le();
30813        __struct.param3 = buf.get_f32_le();
30814        __struct.param4 = buf.get_f32_le();
30815        __struct.x = buf.get_i32_le();
30816        __struct.y = buf.get_i32_le();
30817        __struct.z = buf.get_f32_le();
30818        let tmp = buf.get_u16_le();
30819        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
30820            ::mavlink_core::error::ParserError::InvalidEnum {
30821                enum_type: "MavCmd",
30822                value: tmp as u32,
30823            },
30824        )?;
30825        __struct.target_system = buf.get_u8();
30826        __struct.target_component = buf.get_u8();
30827        let tmp = buf.get_u8();
30828        __struct.frame =
30829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30830                enum_type: "MavFrame",
30831                value: tmp as u32,
30832            })?;
30833        __struct.current = buf.get_u8();
30834        __struct.autocontinue = buf.get_u8();
30835        Ok(__struct)
30836    }
30837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30838        let mut __tmp = BytesMut::new(bytes);
30839        #[allow(clippy::absurd_extreme_comparisons)]
30840        #[allow(unused_comparisons)]
30841        if __tmp.remaining() < Self::ENCODED_LEN {
30842            panic!(
30843                "buffer is too small (need {} bytes, but got {})",
30844                Self::ENCODED_LEN,
30845                __tmp.remaining(),
30846            )
30847        }
30848        __tmp.put_f32_le(self.param1);
30849        __tmp.put_f32_le(self.param2);
30850        __tmp.put_f32_le(self.param3);
30851        __tmp.put_f32_le(self.param4);
30852        __tmp.put_i32_le(self.x);
30853        __tmp.put_i32_le(self.y);
30854        __tmp.put_f32_le(self.z);
30855        __tmp.put_u16_le(self.command as u16);
30856        __tmp.put_u8(self.target_system);
30857        __tmp.put_u8(self.target_component);
30858        __tmp.put_u8(self.frame as u8);
30859        __tmp.put_u8(self.current);
30860        __tmp.put_u8(self.autocontinue);
30861        if matches!(version, MavlinkVersion::V2) {
30862            let len = __tmp.len();
30863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30864        } else {
30865            __tmp.len()
30866        }
30867    }
30868}
30869#[doc = "id: 36"]
30870#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
30871#[derive(Debug, Clone, PartialEq)]
30872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30874pub struct SERVO_OUTPUT_RAW_DATA {
30875    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30876    pub time_usec: u32,
30877    #[doc = "Servo output 1 value"]
30878    pub servo1_raw: u16,
30879    #[doc = "Servo output 2 value"]
30880    pub servo2_raw: u16,
30881    #[doc = "Servo output 3 value"]
30882    pub servo3_raw: u16,
30883    #[doc = "Servo output 4 value"]
30884    pub servo4_raw: u16,
30885    #[doc = "Servo output 5 value"]
30886    pub servo5_raw: u16,
30887    #[doc = "Servo output 6 value"]
30888    pub servo6_raw: u16,
30889    #[doc = "Servo output 7 value"]
30890    pub servo7_raw: u16,
30891    #[doc = "Servo output 8 value"]
30892    pub servo8_raw: u16,
30893    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
30894    pub port: u8,
30895    #[doc = "Servo output 9 value"]
30896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30897    pub servo9_raw: u16,
30898    #[doc = "Servo output 10 value"]
30899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30900    pub servo10_raw: u16,
30901    #[doc = "Servo output 11 value"]
30902    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30903    pub servo11_raw: u16,
30904    #[doc = "Servo output 12 value"]
30905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30906    pub servo12_raw: u16,
30907    #[doc = "Servo output 13 value"]
30908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30909    pub servo13_raw: u16,
30910    #[doc = "Servo output 14 value"]
30911    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30912    pub servo14_raw: u16,
30913    #[doc = "Servo output 15 value"]
30914    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30915    pub servo15_raw: u16,
30916    #[doc = "Servo output 16 value"]
30917    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30918    pub servo16_raw: u16,
30919}
30920impl SERVO_OUTPUT_RAW_DATA {
30921    pub const ENCODED_LEN: usize = 37usize;
30922    pub const DEFAULT: Self = Self {
30923        time_usec: 0_u32,
30924        servo1_raw: 0_u16,
30925        servo2_raw: 0_u16,
30926        servo3_raw: 0_u16,
30927        servo4_raw: 0_u16,
30928        servo5_raw: 0_u16,
30929        servo6_raw: 0_u16,
30930        servo7_raw: 0_u16,
30931        servo8_raw: 0_u16,
30932        port: 0_u8,
30933        servo9_raw: 0_u16,
30934        servo10_raw: 0_u16,
30935        servo11_raw: 0_u16,
30936        servo12_raw: 0_u16,
30937        servo13_raw: 0_u16,
30938        servo14_raw: 0_u16,
30939        servo15_raw: 0_u16,
30940        servo16_raw: 0_u16,
30941    };
30942    #[cfg(feature = "arbitrary")]
30943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30944        use arbitrary::{Arbitrary, Unstructured};
30945        let mut buf = [0u8; 1024];
30946        rng.fill_bytes(&mut buf);
30947        let mut unstructured = Unstructured::new(&buf);
30948        Self::arbitrary(&mut unstructured).unwrap_or_default()
30949    }
30950}
30951impl Default for SERVO_OUTPUT_RAW_DATA {
30952    fn default() -> Self {
30953        Self::DEFAULT.clone()
30954    }
30955}
30956impl MessageData for SERVO_OUTPUT_RAW_DATA {
30957    type Message = MavMessage;
30958    const ID: u32 = 36u32;
30959    const NAME: &'static str = "SERVO_OUTPUT_RAW";
30960    const EXTRA_CRC: u8 = 222u8;
30961    const ENCODED_LEN: usize = 37usize;
30962    fn deser(
30963        _version: MavlinkVersion,
30964        __input: &[u8],
30965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30966        let avail_len = __input.len();
30967        let mut payload_buf = [0; Self::ENCODED_LEN];
30968        let mut buf = if avail_len < Self::ENCODED_LEN {
30969            payload_buf[0..avail_len].copy_from_slice(__input);
30970            Bytes::new(&payload_buf)
30971        } else {
30972            Bytes::new(__input)
30973        };
30974        let mut __struct = Self::default();
30975        __struct.time_usec = buf.get_u32_le();
30976        __struct.servo1_raw = buf.get_u16_le();
30977        __struct.servo2_raw = buf.get_u16_le();
30978        __struct.servo3_raw = buf.get_u16_le();
30979        __struct.servo4_raw = buf.get_u16_le();
30980        __struct.servo5_raw = buf.get_u16_le();
30981        __struct.servo6_raw = buf.get_u16_le();
30982        __struct.servo7_raw = buf.get_u16_le();
30983        __struct.servo8_raw = buf.get_u16_le();
30984        __struct.port = buf.get_u8();
30985        __struct.servo9_raw = buf.get_u16_le();
30986        __struct.servo10_raw = buf.get_u16_le();
30987        __struct.servo11_raw = buf.get_u16_le();
30988        __struct.servo12_raw = buf.get_u16_le();
30989        __struct.servo13_raw = buf.get_u16_le();
30990        __struct.servo14_raw = buf.get_u16_le();
30991        __struct.servo15_raw = buf.get_u16_le();
30992        __struct.servo16_raw = buf.get_u16_le();
30993        Ok(__struct)
30994    }
30995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30996        let mut __tmp = BytesMut::new(bytes);
30997        #[allow(clippy::absurd_extreme_comparisons)]
30998        #[allow(unused_comparisons)]
30999        if __tmp.remaining() < Self::ENCODED_LEN {
31000            panic!(
31001                "buffer is too small (need {} bytes, but got {})",
31002                Self::ENCODED_LEN,
31003                __tmp.remaining(),
31004            )
31005        }
31006        __tmp.put_u32_le(self.time_usec);
31007        __tmp.put_u16_le(self.servo1_raw);
31008        __tmp.put_u16_le(self.servo2_raw);
31009        __tmp.put_u16_le(self.servo3_raw);
31010        __tmp.put_u16_le(self.servo4_raw);
31011        __tmp.put_u16_le(self.servo5_raw);
31012        __tmp.put_u16_le(self.servo6_raw);
31013        __tmp.put_u16_le(self.servo7_raw);
31014        __tmp.put_u16_le(self.servo8_raw);
31015        __tmp.put_u8(self.port);
31016        __tmp.put_u16_le(self.servo9_raw);
31017        __tmp.put_u16_le(self.servo10_raw);
31018        __tmp.put_u16_le(self.servo11_raw);
31019        __tmp.put_u16_le(self.servo12_raw);
31020        __tmp.put_u16_le(self.servo13_raw);
31021        __tmp.put_u16_le(self.servo14_raw);
31022        __tmp.put_u16_le(self.servo15_raw);
31023        __tmp.put_u16_le(self.servo16_raw);
31024        if matches!(version, MavlinkVersion::V2) {
31025            let len = __tmp.len();
31026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31027        } else {
31028            __tmp.len()
31029        }
31030    }
31031}
31032#[doc = "id: 8005"]
31033#[doc = "ASL-fixed-wing controller debug data."]
31034#[derive(Debug, Clone, PartialEq)]
31035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31037pub struct ASLCTRL_DEBUG_DATA {
31038    #[doc = "Debug data"]
31039    pub i32_1: u32,
31040    #[doc = "Debug data"]
31041    pub f_1: f32,
31042    #[doc = "Debug data"]
31043    pub f_2: f32,
31044    #[doc = "Debug data"]
31045    pub f_3: f32,
31046    #[doc = "Debug data"]
31047    pub f_4: f32,
31048    #[doc = "Debug data"]
31049    pub f_5: f32,
31050    #[doc = "Debug data"]
31051    pub f_6: f32,
31052    #[doc = "Debug data"]
31053    pub f_7: f32,
31054    #[doc = "Debug data"]
31055    pub f_8: f32,
31056    #[doc = "Debug data"]
31057    pub i8_1: u8,
31058    #[doc = "Debug data"]
31059    pub i8_2: u8,
31060}
31061impl ASLCTRL_DEBUG_DATA {
31062    pub const ENCODED_LEN: usize = 38usize;
31063    pub const DEFAULT: Self = Self {
31064        i32_1: 0_u32,
31065        f_1: 0.0_f32,
31066        f_2: 0.0_f32,
31067        f_3: 0.0_f32,
31068        f_4: 0.0_f32,
31069        f_5: 0.0_f32,
31070        f_6: 0.0_f32,
31071        f_7: 0.0_f32,
31072        f_8: 0.0_f32,
31073        i8_1: 0_u8,
31074        i8_2: 0_u8,
31075    };
31076    #[cfg(feature = "arbitrary")]
31077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31078        use arbitrary::{Arbitrary, Unstructured};
31079        let mut buf = [0u8; 1024];
31080        rng.fill_bytes(&mut buf);
31081        let mut unstructured = Unstructured::new(&buf);
31082        Self::arbitrary(&mut unstructured).unwrap_or_default()
31083    }
31084}
31085impl Default for ASLCTRL_DEBUG_DATA {
31086    fn default() -> Self {
31087        Self::DEFAULT.clone()
31088    }
31089}
31090impl MessageData for ASLCTRL_DEBUG_DATA {
31091    type Message = MavMessage;
31092    const ID: u32 = 8005u32;
31093    const NAME: &'static str = "ASLCTRL_DEBUG";
31094    const EXTRA_CRC: u8 = 251u8;
31095    const ENCODED_LEN: usize = 38usize;
31096    fn deser(
31097        _version: MavlinkVersion,
31098        __input: &[u8],
31099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31100        let avail_len = __input.len();
31101        let mut payload_buf = [0; Self::ENCODED_LEN];
31102        let mut buf = if avail_len < Self::ENCODED_LEN {
31103            payload_buf[0..avail_len].copy_from_slice(__input);
31104            Bytes::new(&payload_buf)
31105        } else {
31106            Bytes::new(__input)
31107        };
31108        let mut __struct = Self::default();
31109        __struct.i32_1 = buf.get_u32_le();
31110        __struct.f_1 = buf.get_f32_le();
31111        __struct.f_2 = buf.get_f32_le();
31112        __struct.f_3 = buf.get_f32_le();
31113        __struct.f_4 = buf.get_f32_le();
31114        __struct.f_5 = buf.get_f32_le();
31115        __struct.f_6 = buf.get_f32_le();
31116        __struct.f_7 = buf.get_f32_le();
31117        __struct.f_8 = buf.get_f32_le();
31118        __struct.i8_1 = buf.get_u8();
31119        __struct.i8_2 = buf.get_u8();
31120        Ok(__struct)
31121    }
31122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31123        let mut __tmp = BytesMut::new(bytes);
31124        #[allow(clippy::absurd_extreme_comparisons)]
31125        #[allow(unused_comparisons)]
31126        if __tmp.remaining() < Self::ENCODED_LEN {
31127            panic!(
31128                "buffer is too small (need {} bytes, but got {})",
31129                Self::ENCODED_LEN,
31130                __tmp.remaining(),
31131            )
31132        }
31133        __tmp.put_u32_le(self.i32_1);
31134        __tmp.put_f32_le(self.f_1);
31135        __tmp.put_f32_le(self.f_2);
31136        __tmp.put_f32_le(self.f_3);
31137        __tmp.put_f32_le(self.f_4);
31138        __tmp.put_f32_le(self.f_5);
31139        __tmp.put_f32_le(self.f_6);
31140        __tmp.put_f32_le(self.f_7);
31141        __tmp.put_f32_le(self.f_8);
31142        __tmp.put_u8(self.i8_1);
31143        __tmp.put_u8(self.i8_2);
31144        if matches!(version, MavlinkVersion::V2) {
31145            let len = __tmp.len();
31146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31147        } else {
31148            __tmp.len()
31149        }
31150    }
31151}
31152#[doc = "id: 90"]
31153#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
31154#[derive(Debug, Clone, PartialEq)]
31155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31157pub struct HIL_STATE_DATA {
31158    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31159    pub time_usec: u64,
31160    #[doc = "Roll angle"]
31161    pub roll: f32,
31162    #[doc = "Pitch angle"]
31163    pub pitch: f32,
31164    #[doc = "Yaw angle"]
31165    pub yaw: f32,
31166    #[doc = "Body frame roll / phi angular speed"]
31167    pub rollspeed: f32,
31168    #[doc = "Body frame pitch / theta angular speed"]
31169    pub pitchspeed: f32,
31170    #[doc = "Body frame yaw / psi angular speed"]
31171    pub yawspeed: f32,
31172    #[doc = "Latitude"]
31173    pub lat: i32,
31174    #[doc = "Longitude"]
31175    pub lon: i32,
31176    #[doc = "Altitude"]
31177    pub alt: i32,
31178    #[doc = "Ground X Speed (Latitude)"]
31179    pub vx: i16,
31180    #[doc = "Ground Y Speed (Longitude)"]
31181    pub vy: i16,
31182    #[doc = "Ground Z Speed (Altitude)"]
31183    pub vz: i16,
31184    #[doc = "X acceleration"]
31185    pub xacc: i16,
31186    #[doc = "Y acceleration"]
31187    pub yacc: i16,
31188    #[doc = "Z acceleration"]
31189    pub zacc: i16,
31190}
31191impl HIL_STATE_DATA {
31192    pub const ENCODED_LEN: usize = 56usize;
31193    pub const DEFAULT: Self = Self {
31194        time_usec: 0_u64,
31195        roll: 0.0_f32,
31196        pitch: 0.0_f32,
31197        yaw: 0.0_f32,
31198        rollspeed: 0.0_f32,
31199        pitchspeed: 0.0_f32,
31200        yawspeed: 0.0_f32,
31201        lat: 0_i32,
31202        lon: 0_i32,
31203        alt: 0_i32,
31204        vx: 0_i16,
31205        vy: 0_i16,
31206        vz: 0_i16,
31207        xacc: 0_i16,
31208        yacc: 0_i16,
31209        zacc: 0_i16,
31210    };
31211    #[cfg(feature = "arbitrary")]
31212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31213        use arbitrary::{Arbitrary, Unstructured};
31214        let mut buf = [0u8; 1024];
31215        rng.fill_bytes(&mut buf);
31216        let mut unstructured = Unstructured::new(&buf);
31217        Self::arbitrary(&mut unstructured).unwrap_or_default()
31218    }
31219}
31220impl Default for HIL_STATE_DATA {
31221    fn default() -> Self {
31222        Self::DEFAULT.clone()
31223    }
31224}
31225impl MessageData for HIL_STATE_DATA {
31226    type Message = MavMessage;
31227    const ID: u32 = 90u32;
31228    const NAME: &'static str = "HIL_STATE";
31229    const EXTRA_CRC: u8 = 183u8;
31230    const ENCODED_LEN: usize = 56usize;
31231    fn deser(
31232        _version: MavlinkVersion,
31233        __input: &[u8],
31234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31235        let avail_len = __input.len();
31236        let mut payload_buf = [0; Self::ENCODED_LEN];
31237        let mut buf = if avail_len < Self::ENCODED_LEN {
31238            payload_buf[0..avail_len].copy_from_slice(__input);
31239            Bytes::new(&payload_buf)
31240        } else {
31241            Bytes::new(__input)
31242        };
31243        let mut __struct = Self::default();
31244        __struct.time_usec = buf.get_u64_le();
31245        __struct.roll = buf.get_f32_le();
31246        __struct.pitch = buf.get_f32_le();
31247        __struct.yaw = buf.get_f32_le();
31248        __struct.rollspeed = buf.get_f32_le();
31249        __struct.pitchspeed = buf.get_f32_le();
31250        __struct.yawspeed = buf.get_f32_le();
31251        __struct.lat = buf.get_i32_le();
31252        __struct.lon = buf.get_i32_le();
31253        __struct.alt = buf.get_i32_le();
31254        __struct.vx = buf.get_i16_le();
31255        __struct.vy = buf.get_i16_le();
31256        __struct.vz = buf.get_i16_le();
31257        __struct.xacc = buf.get_i16_le();
31258        __struct.yacc = buf.get_i16_le();
31259        __struct.zacc = buf.get_i16_le();
31260        Ok(__struct)
31261    }
31262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31263        let mut __tmp = BytesMut::new(bytes);
31264        #[allow(clippy::absurd_extreme_comparisons)]
31265        #[allow(unused_comparisons)]
31266        if __tmp.remaining() < Self::ENCODED_LEN {
31267            panic!(
31268                "buffer is too small (need {} bytes, but got {})",
31269                Self::ENCODED_LEN,
31270                __tmp.remaining(),
31271            )
31272        }
31273        __tmp.put_u64_le(self.time_usec);
31274        __tmp.put_f32_le(self.roll);
31275        __tmp.put_f32_le(self.pitch);
31276        __tmp.put_f32_le(self.yaw);
31277        __tmp.put_f32_le(self.rollspeed);
31278        __tmp.put_f32_le(self.pitchspeed);
31279        __tmp.put_f32_le(self.yawspeed);
31280        __tmp.put_i32_le(self.lat);
31281        __tmp.put_i32_le(self.lon);
31282        __tmp.put_i32_le(self.alt);
31283        __tmp.put_i16_le(self.vx);
31284        __tmp.put_i16_le(self.vy);
31285        __tmp.put_i16_le(self.vz);
31286        __tmp.put_i16_le(self.xacc);
31287        __tmp.put_i16_le(self.yacc);
31288        __tmp.put_i16_le(self.zacc);
31289        if matches!(version, MavlinkVersion::V2) {
31290            let len = __tmp.len();
31291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31292        } else {
31293            __tmp.len()
31294        }
31295    }
31296}
31297#[doc = "id: 8007"]
31298#[doc = "Extended EKF state estimates for ASLUAVs."]
31299#[derive(Debug, Clone, PartialEq)]
31300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31302pub struct EKF_EXT_DATA {
31303    #[doc = "Time since system start"]
31304    pub timestamp: u64,
31305    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
31306    pub Windspeed: f32,
31307    #[doc = "Wind heading angle from North"]
31308    pub WindDir: f32,
31309    #[doc = "Z (Down) component of inertial wind velocity"]
31310    pub WindZ: f32,
31311    #[doc = "Magnitude of air velocity"]
31312    pub Airspeed: f32,
31313    #[doc = "Sideslip angle"]
31314    pub beta: f32,
31315    #[doc = "Angle of attack"]
31316    pub alpha: f32,
31317}
31318impl EKF_EXT_DATA {
31319    pub const ENCODED_LEN: usize = 32usize;
31320    pub const DEFAULT: Self = Self {
31321        timestamp: 0_u64,
31322        Windspeed: 0.0_f32,
31323        WindDir: 0.0_f32,
31324        WindZ: 0.0_f32,
31325        Airspeed: 0.0_f32,
31326        beta: 0.0_f32,
31327        alpha: 0.0_f32,
31328    };
31329    #[cfg(feature = "arbitrary")]
31330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31331        use arbitrary::{Arbitrary, Unstructured};
31332        let mut buf = [0u8; 1024];
31333        rng.fill_bytes(&mut buf);
31334        let mut unstructured = Unstructured::new(&buf);
31335        Self::arbitrary(&mut unstructured).unwrap_or_default()
31336    }
31337}
31338impl Default for EKF_EXT_DATA {
31339    fn default() -> Self {
31340        Self::DEFAULT.clone()
31341    }
31342}
31343impl MessageData for EKF_EXT_DATA {
31344    type Message = MavMessage;
31345    const ID: u32 = 8007u32;
31346    const NAME: &'static str = "EKF_EXT";
31347    const EXTRA_CRC: u8 = 64u8;
31348    const ENCODED_LEN: usize = 32usize;
31349    fn deser(
31350        _version: MavlinkVersion,
31351        __input: &[u8],
31352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31353        let avail_len = __input.len();
31354        let mut payload_buf = [0; Self::ENCODED_LEN];
31355        let mut buf = if avail_len < Self::ENCODED_LEN {
31356            payload_buf[0..avail_len].copy_from_slice(__input);
31357            Bytes::new(&payload_buf)
31358        } else {
31359            Bytes::new(__input)
31360        };
31361        let mut __struct = Self::default();
31362        __struct.timestamp = buf.get_u64_le();
31363        __struct.Windspeed = buf.get_f32_le();
31364        __struct.WindDir = buf.get_f32_le();
31365        __struct.WindZ = buf.get_f32_le();
31366        __struct.Airspeed = buf.get_f32_le();
31367        __struct.beta = buf.get_f32_le();
31368        __struct.alpha = buf.get_f32_le();
31369        Ok(__struct)
31370    }
31371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31372        let mut __tmp = BytesMut::new(bytes);
31373        #[allow(clippy::absurd_extreme_comparisons)]
31374        #[allow(unused_comparisons)]
31375        if __tmp.remaining() < Self::ENCODED_LEN {
31376            panic!(
31377                "buffer is too small (need {} bytes, but got {})",
31378                Self::ENCODED_LEN,
31379                __tmp.remaining(),
31380            )
31381        }
31382        __tmp.put_u64_le(self.timestamp);
31383        __tmp.put_f32_le(self.Windspeed);
31384        __tmp.put_f32_le(self.WindDir);
31385        __tmp.put_f32_le(self.WindZ);
31386        __tmp.put_f32_le(self.Airspeed);
31387        __tmp.put_f32_le(self.beta);
31388        __tmp.put_f32_le(self.alpha);
31389        if matches!(version, MavlinkVersion::V2) {
31390            let len = __tmp.len();
31391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31392        } else {
31393            __tmp.len()
31394        }
31395    }
31396}
31397#[doc = "id: 123"]
31398#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
31399#[derive(Debug, Clone, PartialEq)]
31400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31402pub struct GPS_INJECT_DATA_DATA {
31403    #[doc = "System ID"]
31404    pub target_system: u8,
31405    #[doc = "Component ID"]
31406    pub target_component: u8,
31407    #[doc = "Data length"]
31408    pub len: u8,
31409    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
31410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31411    pub data: [u8; 110],
31412}
31413impl GPS_INJECT_DATA_DATA {
31414    pub const ENCODED_LEN: usize = 113usize;
31415    pub const DEFAULT: Self = Self {
31416        target_system: 0_u8,
31417        target_component: 0_u8,
31418        len: 0_u8,
31419        data: [0_u8; 110usize],
31420    };
31421    #[cfg(feature = "arbitrary")]
31422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31423        use arbitrary::{Arbitrary, Unstructured};
31424        let mut buf = [0u8; 1024];
31425        rng.fill_bytes(&mut buf);
31426        let mut unstructured = Unstructured::new(&buf);
31427        Self::arbitrary(&mut unstructured).unwrap_or_default()
31428    }
31429}
31430impl Default for GPS_INJECT_DATA_DATA {
31431    fn default() -> Self {
31432        Self::DEFAULT.clone()
31433    }
31434}
31435impl MessageData for GPS_INJECT_DATA_DATA {
31436    type Message = MavMessage;
31437    const ID: u32 = 123u32;
31438    const NAME: &'static str = "GPS_INJECT_DATA";
31439    const EXTRA_CRC: u8 = 250u8;
31440    const ENCODED_LEN: usize = 113usize;
31441    fn deser(
31442        _version: MavlinkVersion,
31443        __input: &[u8],
31444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31445        let avail_len = __input.len();
31446        let mut payload_buf = [0; Self::ENCODED_LEN];
31447        let mut buf = if avail_len < Self::ENCODED_LEN {
31448            payload_buf[0..avail_len].copy_from_slice(__input);
31449            Bytes::new(&payload_buf)
31450        } else {
31451            Bytes::new(__input)
31452        };
31453        let mut __struct = Self::default();
31454        __struct.target_system = buf.get_u8();
31455        __struct.target_component = buf.get_u8();
31456        __struct.len = buf.get_u8();
31457        for v in &mut __struct.data {
31458            let val = buf.get_u8();
31459            *v = val;
31460        }
31461        Ok(__struct)
31462    }
31463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31464        let mut __tmp = BytesMut::new(bytes);
31465        #[allow(clippy::absurd_extreme_comparisons)]
31466        #[allow(unused_comparisons)]
31467        if __tmp.remaining() < Self::ENCODED_LEN {
31468            panic!(
31469                "buffer is too small (need {} bytes, but got {})",
31470                Self::ENCODED_LEN,
31471                __tmp.remaining(),
31472            )
31473        }
31474        __tmp.put_u8(self.target_system);
31475        __tmp.put_u8(self.target_component);
31476        __tmp.put_u8(self.len);
31477        for val in &self.data {
31478            __tmp.put_u8(*val);
31479        }
31480        if matches!(version, MavlinkVersion::V2) {
31481            let len = __tmp.len();
31482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31483        } else {
31484            __tmp.len()
31485        }
31486    }
31487}
31488#[doc = "id: 275"]
31489#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
31490#[derive(Debug, Clone, PartialEq)]
31491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31493pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
31494    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
31495    pub point_x: f32,
31496    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
31497    pub point_y: f32,
31498    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
31499    pub radius: f32,
31500    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
31501    pub rec_top_x: f32,
31502    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
31503    pub rec_top_y: f32,
31504    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
31505    pub rec_bottom_x: f32,
31506    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
31507    pub rec_bottom_y: f32,
31508    #[doc = "Current tracking status"]
31509    pub tracking_status: CameraTrackingStatusFlags,
31510    #[doc = "Current tracking mode"]
31511    pub tracking_mode: CameraTrackingMode,
31512    #[doc = "Defines location of target data"]
31513    pub target_data: CameraTrackingTargetData,
31514    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31516    pub camera_device_id: u8,
31517}
31518impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
31519    pub const ENCODED_LEN: usize = 32usize;
31520    pub const DEFAULT: Self = Self {
31521        point_x: 0.0_f32,
31522        point_y: 0.0_f32,
31523        radius: 0.0_f32,
31524        rec_top_x: 0.0_f32,
31525        rec_top_y: 0.0_f32,
31526        rec_bottom_x: 0.0_f32,
31527        rec_bottom_y: 0.0_f32,
31528        tracking_status: CameraTrackingStatusFlags::DEFAULT,
31529        tracking_mode: CameraTrackingMode::DEFAULT,
31530        target_data: CameraTrackingTargetData::DEFAULT,
31531        camera_device_id: 0_u8,
31532    };
31533    #[cfg(feature = "arbitrary")]
31534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31535        use arbitrary::{Arbitrary, Unstructured};
31536        let mut buf = [0u8; 1024];
31537        rng.fill_bytes(&mut buf);
31538        let mut unstructured = Unstructured::new(&buf);
31539        Self::arbitrary(&mut unstructured).unwrap_or_default()
31540    }
31541}
31542impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
31543    fn default() -> Self {
31544        Self::DEFAULT.clone()
31545    }
31546}
31547impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
31548    type Message = MavMessage;
31549    const ID: u32 = 275u32;
31550    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
31551    const EXTRA_CRC: u8 = 126u8;
31552    const ENCODED_LEN: usize = 32usize;
31553    fn deser(
31554        _version: MavlinkVersion,
31555        __input: &[u8],
31556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31557        let avail_len = __input.len();
31558        let mut payload_buf = [0; Self::ENCODED_LEN];
31559        let mut buf = if avail_len < Self::ENCODED_LEN {
31560            payload_buf[0..avail_len].copy_from_slice(__input);
31561            Bytes::new(&payload_buf)
31562        } else {
31563            Bytes::new(__input)
31564        };
31565        let mut __struct = Self::default();
31566        __struct.point_x = buf.get_f32_le();
31567        __struct.point_y = buf.get_f32_le();
31568        __struct.radius = buf.get_f32_le();
31569        __struct.rec_top_x = buf.get_f32_le();
31570        __struct.rec_top_y = buf.get_f32_le();
31571        __struct.rec_bottom_x = buf.get_f32_le();
31572        __struct.rec_bottom_y = buf.get_f32_le();
31573        let tmp = buf.get_u8();
31574        __struct.tracking_status =
31575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31576                enum_type: "CameraTrackingStatusFlags",
31577                value: tmp as u32,
31578            })?;
31579        let tmp = buf.get_u8();
31580        __struct.tracking_mode =
31581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31582                enum_type: "CameraTrackingMode",
31583                value: tmp as u32,
31584            })?;
31585        let tmp = buf.get_u8();
31586        __struct.target_data =
31587            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
31588                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31589                    flag_type: "CameraTrackingTargetData",
31590                    value: tmp as u32,
31591                })?;
31592        __struct.camera_device_id = buf.get_u8();
31593        Ok(__struct)
31594    }
31595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31596        let mut __tmp = BytesMut::new(bytes);
31597        #[allow(clippy::absurd_extreme_comparisons)]
31598        #[allow(unused_comparisons)]
31599        if __tmp.remaining() < Self::ENCODED_LEN {
31600            panic!(
31601                "buffer is too small (need {} bytes, but got {})",
31602                Self::ENCODED_LEN,
31603                __tmp.remaining(),
31604            )
31605        }
31606        __tmp.put_f32_le(self.point_x);
31607        __tmp.put_f32_le(self.point_y);
31608        __tmp.put_f32_le(self.radius);
31609        __tmp.put_f32_le(self.rec_top_x);
31610        __tmp.put_f32_le(self.rec_top_y);
31611        __tmp.put_f32_le(self.rec_bottom_x);
31612        __tmp.put_f32_le(self.rec_bottom_y);
31613        __tmp.put_u8(self.tracking_status as u8);
31614        __tmp.put_u8(self.tracking_mode as u8);
31615        __tmp.put_u8(self.target_data.bits());
31616        __tmp.put_u8(self.camera_device_id);
31617        if matches!(version, MavlinkVersion::V2) {
31618            let len = __tmp.len();
31619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31620        } else {
31621            __tmp.len()
31622        }
31623    }
31624}
31625#[doc = "id: 23"]
31626#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
31627#[derive(Debug, Clone, PartialEq)]
31628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31630pub struct PARAM_SET_DATA {
31631    #[doc = "Onboard parameter value"]
31632    pub param_value: f32,
31633    #[doc = "System ID"]
31634    pub target_system: u8,
31635    #[doc = "Component ID"]
31636    pub target_component: u8,
31637    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
31638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31639    pub param_id: [u8; 16],
31640    #[doc = "Onboard parameter type."]
31641    pub param_type: MavParamType,
31642}
31643impl PARAM_SET_DATA {
31644    pub const ENCODED_LEN: usize = 23usize;
31645    pub const DEFAULT: Self = Self {
31646        param_value: 0.0_f32,
31647        target_system: 0_u8,
31648        target_component: 0_u8,
31649        param_id: [0_u8; 16usize],
31650        param_type: MavParamType::DEFAULT,
31651    };
31652    #[cfg(feature = "arbitrary")]
31653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31654        use arbitrary::{Arbitrary, Unstructured};
31655        let mut buf = [0u8; 1024];
31656        rng.fill_bytes(&mut buf);
31657        let mut unstructured = Unstructured::new(&buf);
31658        Self::arbitrary(&mut unstructured).unwrap_or_default()
31659    }
31660}
31661impl Default for PARAM_SET_DATA {
31662    fn default() -> Self {
31663        Self::DEFAULT.clone()
31664    }
31665}
31666impl MessageData for PARAM_SET_DATA {
31667    type Message = MavMessage;
31668    const ID: u32 = 23u32;
31669    const NAME: &'static str = "PARAM_SET";
31670    const EXTRA_CRC: u8 = 168u8;
31671    const ENCODED_LEN: usize = 23usize;
31672    fn deser(
31673        _version: MavlinkVersion,
31674        __input: &[u8],
31675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31676        let avail_len = __input.len();
31677        let mut payload_buf = [0; Self::ENCODED_LEN];
31678        let mut buf = if avail_len < Self::ENCODED_LEN {
31679            payload_buf[0..avail_len].copy_from_slice(__input);
31680            Bytes::new(&payload_buf)
31681        } else {
31682            Bytes::new(__input)
31683        };
31684        let mut __struct = Self::default();
31685        __struct.param_value = buf.get_f32_le();
31686        __struct.target_system = buf.get_u8();
31687        __struct.target_component = buf.get_u8();
31688        for v in &mut __struct.param_id {
31689            let val = buf.get_u8();
31690            *v = val;
31691        }
31692        let tmp = buf.get_u8();
31693        __struct.param_type =
31694            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31695                enum_type: "MavParamType",
31696                value: tmp as u32,
31697            })?;
31698        Ok(__struct)
31699    }
31700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31701        let mut __tmp = BytesMut::new(bytes);
31702        #[allow(clippy::absurd_extreme_comparisons)]
31703        #[allow(unused_comparisons)]
31704        if __tmp.remaining() < Self::ENCODED_LEN {
31705            panic!(
31706                "buffer is too small (need {} bytes, but got {})",
31707                Self::ENCODED_LEN,
31708                __tmp.remaining(),
31709            )
31710        }
31711        __tmp.put_f32_le(self.param_value);
31712        __tmp.put_u8(self.target_system);
31713        __tmp.put_u8(self.target_component);
31714        for val in &self.param_id {
31715            __tmp.put_u8(*val);
31716        }
31717        __tmp.put_u8(self.param_type as u8);
31718        if matches!(version, MavlinkVersion::V2) {
31719            let len = __tmp.len();
31720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31721        } else {
31722            __tmp.len()
31723        }
31724    }
31725}
31726#[doc = "id: 22"]
31727#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
31728#[derive(Debug, Clone, PartialEq)]
31729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31731pub struct PARAM_VALUE_DATA {
31732    #[doc = "Onboard parameter value"]
31733    pub param_value: f32,
31734    #[doc = "Total number of onboard parameters"]
31735    pub param_count: u16,
31736    #[doc = "Index of this onboard parameter"]
31737    pub param_index: u16,
31738    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
31739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31740    pub param_id: [u8; 16],
31741    #[doc = "Onboard parameter type."]
31742    pub param_type: MavParamType,
31743}
31744impl PARAM_VALUE_DATA {
31745    pub const ENCODED_LEN: usize = 25usize;
31746    pub const DEFAULT: Self = Self {
31747        param_value: 0.0_f32,
31748        param_count: 0_u16,
31749        param_index: 0_u16,
31750        param_id: [0_u8; 16usize],
31751        param_type: MavParamType::DEFAULT,
31752    };
31753    #[cfg(feature = "arbitrary")]
31754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31755        use arbitrary::{Arbitrary, Unstructured};
31756        let mut buf = [0u8; 1024];
31757        rng.fill_bytes(&mut buf);
31758        let mut unstructured = Unstructured::new(&buf);
31759        Self::arbitrary(&mut unstructured).unwrap_or_default()
31760    }
31761}
31762impl Default for PARAM_VALUE_DATA {
31763    fn default() -> Self {
31764        Self::DEFAULT.clone()
31765    }
31766}
31767impl MessageData for PARAM_VALUE_DATA {
31768    type Message = MavMessage;
31769    const ID: u32 = 22u32;
31770    const NAME: &'static str = "PARAM_VALUE";
31771    const EXTRA_CRC: u8 = 220u8;
31772    const ENCODED_LEN: usize = 25usize;
31773    fn deser(
31774        _version: MavlinkVersion,
31775        __input: &[u8],
31776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31777        let avail_len = __input.len();
31778        let mut payload_buf = [0; Self::ENCODED_LEN];
31779        let mut buf = if avail_len < Self::ENCODED_LEN {
31780            payload_buf[0..avail_len].copy_from_slice(__input);
31781            Bytes::new(&payload_buf)
31782        } else {
31783            Bytes::new(__input)
31784        };
31785        let mut __struct = Self::default();
31786        __struct.param_value = buf.get_f32_le();
31787        __struct.param_count = buf.get_u16_le();
31788        __struct.param_index = buf.get_u16_le();
31789        for v in &mut __struct.param_id {
31790            let val = buf.get_u8();
31791            *v = val;
31792        }
31793        let tmp = buf.get_u8();
31794        __struct.param_type =
31795            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31796                enum_type: "MavParamType",
31797                value: tmp as u32,
31798            })?;
31799        Ok(__struct)
31800    }
31801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31802        let mut __tmp = BytesMut::new(bytes);
31803        #[allow(clippy::absurd_extreme_comparisons)]
31804        #[allow(unused_comparisons)]
31805        if __tmp.remaining() < Self::ENCODED_LEN {
31806            panic!(
31807                "buffer is too small (need {} bytes, but got {})",
31808                Self::ENCODED_LEN,
31809                __tmp.remaining(),
31810            )
31811        }
31812        __tmp.put_f32_le(self.param_value);
31813        __tmp.put_u16_le(self.param_count);
31814        __tmp.put_u16_le(self.param_index);
31815        for val in &self.param_id {
31816            __tmp.put_u8(*val);
31817        }
31818        __tmp.put_u8(self.param_type as u8);
31819        if matches!(version, MavlinkVersion::V2) {
31820            let len = __tmp.len();
31821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31822        } else {
31823            __tmp.len()
31824        }
31825    }
31826}
31827#[doc = "id: 387"]
31828#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
31829#[derive(Debug, Clone, PartialEq)]
31830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31832pub struct CANFD_FRAME_DATA {
31833    #[doc = "Frame ID"]
31834    pub id: u32,
31835    #[doc = "System ID."]
31836    pub target_system: u8,
31837    #[doc = "Component ID."]
31838    pub target_component: u8,
31839    #[doc = "bus number"]
31840    pub bus: u8,
31841    #[doc = "Frame length"]
31842    pub len: u8,
31843    #[doc = "Frame data"]
31844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31845    pub data: [u8; 64],
31846}
31847impl CANFD_FRAME_DATA {
31848    pub const ENCODED_LEN: usize = 72usize;
31849    pub const DEFAULT: Self = Self {
31850        id: 0_u32,
31851        target_system: 0_u8,
31852        target_component: 0_u8,
31853        bus: 0_u8,
31854        len: 0_u8,
31855        data: [0_u8; 64usize],
31856    };
31857    #[cfg(feature = "arbitrary")]
31858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31859        use arbitrary::{Arbitrary, Unstructured};
31860        let mut buf = [0u8; 1024];
31861        rng.fill_bytes(&mut buf);
31862        let mut unstructured = Unstructured::new(&buf);
31863        Self::arbitrary(&mut unstructured).unwrap_or_default()
31864    }
31865}
31866impl Default for CANFD_FRAME_DATA {
31867    fn default() -> Self {
31868        Self::DEFAULT.clone()
31869    }
31870}
31871impl MessageData for CANFD_FRAME_DATA {
31872    type Message = MavMessage;
31873    const ID: u32 = 387u32;
31874    const NAME: &'static str = "CANFD_FRAME";
31875    const EXTRA_CRC: u8 = 4u8;
31876    const ENCODED_LEN: usize = 72usize;
31877    fn deser(
31878        _version: MavlinkVersion,
31879        __input: &[u8],
31880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31881        let avail_len = __input.len();
31882        let mut payload_buf = [0; Self::ENCODED_LEN];
31883        let mut buf = if avail_len < Self::ENCODED_LEN {
31884            payload_buf[0..avail_len].copy_from_slice(__input);
31885            Bytes::new(&payload_buf)
31886        } else {
31887            Bytes::new(__input)
31888        };
31889        let mut __struct = Self::default();
31890        __struct.id = buf.get_u32_le();
31891        __struct.target_system = buf.get_u8();
31892        __struct.target_component = buf.get_u8();
31893        __struct.bus = buf.get_u8();
31894        __struct.len = buf.get_u8();
31895        for v in &mut __struct.data {
31896            let val = buf.get_u8();
31897            *v = val;
31898        }
31899        Ok(__struct)
31900    }
31901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31902        let mut __tmp = BytesMut::new(bytes);
31903        #[allow(clippy::absurd_extreme_comparisons)]
31904        #[allow(unused_comparisons)]
31905        if __tmp.remaining() < Self::ENCODED_LEN {
31906            panic!(
31907                "buffer is too small (need {} bytes, but got {})",
31908                Self::ENCODED_LEN,
31909                __tmp.remaining(),
31910            )
31911        }
31912        __tmp.put_u32_le(self.id);
31913        __tmp.put_u8(self.target_system);
31914        __tmp.put_u8(self.target_component);
31915        __tmp.put_u8(self.bus);
31916        __tmp.put_u8(self.len);
31917        for val in &self.data {
31918            __tmp.put_u8(*val);
31919        }
31920        if matches!(version, MavlinkVersion::V2) {
31921            let len = __tmp.len();
31922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31923        } else {
31924            __tmp.len()
31925        }
31926    }
31927}
31928#[doc = "id: 114"]
31929#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
31930#[derive(Debug, Clone, PartialEq)]
31931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31933pub struct HIL_OPTICAL_FLOW_DATA {
31934    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31935    pub time_usec: u64,
31936    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
31937    pub integration_time_us: u32,
31938    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
31939    pub integrated_x: f32,
31940    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
31941    pub integrated_y: f32,
31942    #[doc = "RH rotation around X axis"]
31943    pub integrated_xgyro: f32,
31944    #[doc = "RH rotation around Y axis"]
31945    pub integrated_ygyro: f32,
31946    #[doc = "RH rotation around Z axis"]
31947    pub integrated_zgyro: f32,
31948    #[doc = "Time since the distance was sampled."]
31949    pub time_delta_distance_us: u32,
31950    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
31951    pub distance: f32,
31952    #[doc = "Temperature"]
31953    pub temperature: i16,
31954    #[doc = "Sensor ID"]
31955    pub sensor_id: u8,
31956    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
31957    pub quality: u8,
31958}
31959impl HIL_OPTICAL_FLOW_DATA {
31960    pub const ENCODED_LEN: usize = 44usize;
31961    pub const DEFAULT: Self = Self {
31962        time_usec: 0_u64,
31963        integration_time_us: 0_u32,
31964        integrated_x: 0.0_f32,
31965        integrated_y: 0.0_f32,
31966        integrated_xgyro: 0.0_f32,
31967        integrated_ygyro: 0.0_f32,
31968        integrated_zgyro: 0.0_f32,
31969        time_delta_distance_us: 0_u32,
31970        distance: 0.0_f32,
31971        temperature: 0_i16,
31972        sensor_id: 0_u8,
31973        quality: 0_u8,
31974    };
31975    #[cfg(feature = "arbitrary")]
31976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31977        use arbitrary::{Arbitrary, Unstructured};
31978        let mut buf = [0u8; 1024];
31979        rng.fill_bytes(&mut buf);
31980        let mut unstructured = Unstructured::new(&buf);
31981        Self::arbitrary(&mut unstructured).unwrap_or_default()
31982    }
31983}
31984impl Default for HIL_OPTICAL_FLOW_DATA {
31985    fn default() -> Self {
31986        Self::DEFAULT.clone()
31987    }
31988}
31989impl MessageData for HIL_OPTICAL_FLOW_DATA {
31990    type Message = MavMessage;
31991    const ID: u32 = 114u32;
31992    const NAME: &'static str = "HIL_OPTICAL_FLOW";
31993    const EXTRA_CRC: u8 = 237u8;
31994    const ENCODED_LEN: usize = 44usize;
31995    fn deser(
31996        _version: MavlinkVersion,
31997        __input: &[u8],
31998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31999        let avail_len = __input.len();
32000        let mut payload_buf = [0; Self::ENCODED_LEN];
32001        let mut buf = if avail_len < Self::ENCODED_LEN {
32002            payload_buf[0..avail_len].copy_from_slice(__input);
32003            Bytes::new(&payload_buf)
32004        } else {
32005            Bytes::new(__input)
32006        };
32007        let mut __struct = Self::default();
32008        __struct.time_usec = buf.get_u64_le();
32009        __struct.integration_time_us = buf.get_u32_le();
32010        __struct.integrated_x = buf.get_f32_le();
32011        __struct.integrated_y = buf.get_f32_le();
32012        __struct.integrated_xgyro = buf.get_f32_le();
32013        __struct.integrated_ygyro = buf.get_f32_le();
32014        __struct.integrated_zgyro = buf.get_f32_le();
32015        __struct.time_delta_distance_us = buf.get_u32_le();
32016        __struct.distance = buf.get_f32_le();
32017        __struct.temperature = buf.get_i16_le();
32018        __struct.sensor_id = buf.get_u8();
32019        __struct.quality = buf.get_u8();
32020        Ok(__struct)
32021    }
32022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32023        let mut __tmp = BytesMut::new(bytes);
32024        #[allow(clippy::absurd_extreme_comparisons)]
32025        #[allow(unused_comparisons)]
32026        if __tmp.remaining() < Self::ENCODED_LEN {
32027            panic!(
32028                "buffer is too small (need {} bytes, but got {})",
32029                Self::ENCODED_LEN,
32030                __tmp.remaining(),
32031            )
32032        }
32033        __tmp.put_u64_le(self.time_usec);
32034        __tmp.put_u32_le(self.integration_time_us);
32035        __tmp.put_f32_le(self.integrated_x);
32036        __tmp.put_f32_le(self.integrated_y);
32037        __tmp.put_f32_le(self.integrated_xgyro);
32038        __tmp.put_f32_le(self.integrated_ygyro);
32039        __tmp.put_f32_le(self.integrated_zgyro);
32040        __tmp.put_u32_le(self.time_delta_distance_us);
32041        __tmp.put_f32_le(self.distance);
32042        __tmp.put_i16_le(self.temperature);
32043        __tmp.put_u8(self.sensor_id);
32044        __tmp.put_u8(self.quality);
32045        if matches!(version, MavlinkVersion::V2) {
32046            let len = __tmp.len();
32047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32048        } else {
32049            __tmp.len()
32050        }
32051    }
32052}
32053#[doc = "id: 410"]
32054#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32055#[derive(Debug, Clone, PartialEq)]
32056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32058pub struct EVENT_DATA {
32059    #[doc = "Event ID (as defined in the component metadata)"]
32060    pub id: u32,
32061    #[doc = "Timestamp (time since system boot when the event happened)."]
32062    pub event_time_boot_ms: u32,
32063    #[doc = "Sequence number."]
32064    pub sequence: u16,
32065    #[doc = "Component ID"]
32066    pub destination_component: u8,
32067    #[doc = "System ID"]
32068    pub destination_system: u8,
32069    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
32070    pub log_levels: u8,
32071    #[doc = "Arguments (depend on event ID)."]
32072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32073    pub arguments: [u8; 40],
32074}
32075impl EVENT_DATA {
32076    pub const ENCODED_LEN: usize = 53usize;
32077    pub const DEFAULT: Self = Self {
32078        id: 0_u32,
32079        event_time_boot_ms: 0_u32,
32080        sequence: 0_u16,
32081        destination_component: 0_u8,
32082        destination_system: 0_u8,
32083        log_levels: 0_u8,
32084        arguments: [0_u8; 40usize],
32085    };
32086    #[cfg(feature = "arbitrary")]
32087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32088        use arbitrary::{Arbitrary, Unstructured};
32089        let mut buf = [0u8; 1024];
32090        rng.fill_bytes(&mut buf);
32091        let mut unstructured = Unstructured::new(&buf);
32092        Self::arbitrary(&mut unstructured).unwrap_or_default()
32093    }
32094}
32095impl Default for EVENT_DATA {
32096    fn default() -> Self {
32097        Self::DEFAULT.clone()
32098    }
32099}
32100impl MessageData for EVENT_DATA {
32101    type Message = MavMessage;
32102    const ID: u32 = 410u32;
32103    const NAME: &'static str = "EVENT";
32104    const EXTRA_CRC: u8 = 160u8;
32105    const ENCODED_LEN: usize = 53usize;
32106    fn deser(
32107        _version: MavlinkVersion,
32108        __input: &[u8],
32109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32110        let avail_len = __input.len();
32111        let mut payload_buf = [0; Self::ENCODED_LEN];
32112        let mut buf = if avail_len < Self::ENCODED_LEN {
32113            payload_buf[0..avail_len].copy_from_slice(__input);
32114            Bytes::new(&payload_buf)
32115        } else {
32116            Bytes::new(__input)
32117        };
32118        let mut __struct = Self::default();
32119        __struct.id = buf.get_u32_le();
32120        __struct.event_time_boot_ms = buf.get_u32_le();
32121        __struct.sequence = buf.get_u16_le();
32122        __struct.destination_component = buf.get_u8();
32123        __struct.destination_system = buf.get_u8();
32124        __struct.log_levels = buf.get_u8();
32125        for v in &mut __struct.arguments {
32126            let val = buf.get_u8();
32127            *v = val;
32128        }
32129        Ok(__struct)
32130    }
32131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32132        let mut __tmp = BytesMut::new(bytes);
32133        #[allow(clippy::absurd_extreme_comparisons)]
32134        #[allow(unused_comparisons)]
32135        if __tmp.remaining() < Self::ENCODED_LEN {
32136            panic!(
32137                "buffer is too small (need {} bytes, but got {})",
32138                Self::ENCODED_LEN,
32139                __tmp.remaining(),
32140            )
32141        }
32142        __tmp.put_u32_le(self.id);
32143        __tmp.put_u32_le(self.event_time_boot_ms);
32144        __tmp.put_u16_le(self.sequence);
32145        __tmp.put_u8(self.destination_component);
32146        __tmp.put_u8(self.destination_system);
32147        __tmp.put_u8(self.log_levels);
32148        for val in &self.arguments {
32149            __tmp.put_u8(*val);
32150        }
32151        if matches!(version, MavlinkVersion::V2) {
32152            let len = __tmp.len();
32153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32154        } else {
32155            __tmp.len()
32156        }
32157    }
32158}
32159#[doc = "id: 372"]
32160#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32161#[derive(Debug, Clone, PartialEq)]
32162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32164pub struct BATTERY_INFO_DATA {
32165    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
32166    pub discharge_minimum_voltage: f32,
32167    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
32168    pub charging_minimum_voltage: f32,
32169    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
32170    pub resting_minimum_voltage: f32,
32171    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
32172    pub charging_maximum_voltage: f32,
32173    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
32174    pub charging_maximum_current: f32,
32175    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
32176    pub nominal_voltage: f32,
32177    #[doc = "Maximum pack discharge current. 0: field not provided."]
32178    pub discharge_maximum_current: f32,
32179    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
32180    pub discharge_maximum_burst_current: f32,
32181    #[doc = "Fully charged design capacity. 0: field not provided."]
32182    pub design_capacity: f32,
32183    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
32184    pub full_charge_capacity: f32,
32185    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
32186    pub cycle_count: u16,
32187    #[doc = "Battery weight. 0: field not provided."]
32188    pub weight: u16,
32189    #[doc = "Battery ID"]
32190    pub id: u8,
32191    #[doc = "Function of the battery."]
32192    pub battery_function: MavBatteryFunction,
32193    #[doc = "Type (chemistry) of the battery."]
32194    pub mavtype: MavBatteryType,
32195    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
32196    pub state_of_health: u8,
32197    #[doc = "Number of battery cells in series. 0: field not provided."]
32198    pub cells_in_series: u8,
32199    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
32200    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32201    pub manufacture_date: [u8; 9],
32202    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
32203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32204    pub serial_number: [u8; 32],
32205    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
32206    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32207    pub name: [u8; 50],
32208}
32209impl BATTERY_INFO_DATA {
32210    pub const ENCODED_LEN: usize = 140usize;
32211    pub const DEFAULT: Self = Self {
32212        discharge_minimum_voltage: 0.0_f32,
32213        charging_minimum_voltage: 0.0_f32,
32214        resting_minimum_voltage: 0.0_f32,
32215        charging_maximum_voltage: 0.0_f32,
32216        charging_maximum_current: 0.0_f32,
32217        nominal_voltage: 0.0_f32,
32218        discharge_maximum_current: 0.0_f32,
32219        discharge_maximum_burst_current: 0.0_f32,
32220        design_capacity: 0.0_f32,
32221        full_charge_capacity: 0.0_f32,
32222        cycle_count: 0_u16,
32223        weight: 0_u16,
32224        id: 0_u8,
32225        battery_function: MavBatteryFunction::DEFAULT,
32226        mavtype: MavBatteryType::DEFAULT,
32227        state_of_health: 0_u8,
32228        cells_in_series: 0_u8,
32229        manufacture_date: [0_u8; 9usize],
32230        serial_number: [0_u8; 32usize],
32231        name: [0_u8; 50usize],
32232    };
32233    #[cfg(feature = "arbitrary")]
32234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32235        use arbitrary::{Arbitrary, Unstructured};
32236        let mut buf = [0u8; 1024];
32237        rng.fill_bytes(&mut buf);
32238        let mut unstructured = Unstructured::new(&buf);
32239        Self::arbitrary(&mut unstructured).unwrap_or_default()
32240    }
32241}
32242impl Default for BATTERY_INFO_DATA {
32243    fn default() -> Self {
32244        Self::DEFAULT.clone()
32245    }
32246}
32247impl MessageData for BATTERY_INFO_DATA {
32248    type Message = MavMessage;
32249    const ID: u32 = 372u32;
32250    const NAME: &'static str = "BATTERY_INFO";
32251    const EXTRA_CRC: u8 = 26u8;
32252    const ENCODED_LEN: usize = 140usize;
32253    fn deser(
32254        _version: MavlinkVersion,
32255        __input: &[u8],
32256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32257        let avail_len = __input.len();
32258        let mut payload_buf = [0; Self::ENCODED_LEN];
32259        let mut buf = if avail_len < Self::ENCODED_LEN {
32260            payload_buf[0..avail_len].copy_from_slice(__input);
32261            Bytes::new(&payload_buf)
32262        } else {
32263            Bytes::new(__input)
32264        };
32265        let mut __struct = Self::default();
32266        __struct.discharge_minimum_voltage = buf.get_f32_le();
32267        __struct.charging_minimum_voltage = buf.get_f32_le();
32268        __struct.resting_minimum_voltage = buf.get_f32_le();
32269        __struct.charging_maximum_voltage = buf.get_f32_le();
32270        __struct.charging_maximum_current = buf.get_f32_le();
32271        __struct.nominal_voltage = buf.get_f32_le();
32272        __struct.discharge_maximum_current = buf.get_f32_le();
32273        __struct.discharge_maximum_burst_current = buf.get_f32_le();
32274        __struct.design_capacity = buf.get_f32_le();
32275        __struct.full_charge_capacity = buf.get_f32_le();
32276        __struct.cycle_count = buf.get_u16_le();
32277        __struct.weight = buf.get_u16_le();
32278        __struct.id = buf.get_u8();
32279        let tmp = buf.get_u8();
32280        __struct.battery_function =
32281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32282                enum_type: "MavBatteryFunction",
32283                value: tmp as u32,
32284            })?;
32285        let tmp = buf.get_u8();
32286        __struct.mavtype =
32287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32288                enum_type: "MavBatteryType",
32289                value: tmp as u32,
32290            })?;
32291        __struct.state_of_health = buf.get_u8();
32292        __struct.cells_in_series = buf.get_u8();
32293        for v in &mut __struct.manufacture_date {
32294            let val = buf.get_u8();
32295            *v = val;
32296        }
32297        for v in &mut __struct.serial_number {
32298            let val = buf.get_u8();
32299            *v = val;
32300        }
32301        for v in &mut __struct.name {
32302            let val = buf.get_u8();
32303            *v = val;
32304        }
32305        Ok(__struct)
32306    }
32307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32308        let mut __tmp = BytesMut::new(bytes);
32309        #[allow(clippy::absurd_extreme_comparisons)]
32310        #[allow(unused_comparisons)]
32311        if __tmp.remaining() < Self::ENCODED_LEN {
32312            panic!(
32313                "buffer is too small (need {} bytes, but got {})",
32314                Self::ENCODED_LEN,
32315                __tmp.remaining(),
32316            )
32317        }
32318        __tmp.put_f32_le(self.discharge_minimum_voltage);
32319        __tmp.put_f32_le(self.charging_minimum_voltage);
32320        __tmp.put_f32_le(self.resting_minimum_voltage);
32321        __tmp.put_f32_le(self.charging_maximum_voltage);
32322        __tmp.put_f32_le(self.charging_maximum_current);
32323        __tmp.put_f32_le(self.nominal_voltage);
32324        __tmp.put_f32_le(self.discharge_maximum_current);
32325        __tmp.put_f32_le(self.discharge_maximum_burst_current);
32326        __tmp.put_f32_le(self.design_capacity);
32327        __tmp.put_f32_le(self.full_charge_capacity);
32328        __tmp.put_u16_le(self.cycle_count);
32329        __tmp.put_u16_le(self.weight);
32330        __tmp.put_u8(self.id);
32331        __tmp.put_u8(self.battery_function as u8);
32332        __tmp.put_u8(self.mavtype as u8);
32333        __tmp.put_u8(self.state_of_health);
32334        __tmp.put_u8(self.cells_in_series);
32335        for val in &self.manufacture_date {
32336            __tmp.put_u8(*val);
32337        }
32338        for val in &self.serial_number {
32339            __tmp.put_u8(*val);
32340        }
32341        for val in &self.name {
32342            __tmp.put_u8(*val);
32343        }
32344        if matches!(version, MavlinkVersion::V2) {
32345            let len = __tmp.len();
32346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32347        } else {
32348            __tmp.len()
32349        }
32350    }
32351}
32352#[doc = "id: 440"]
32353#[doc = "Illuminator status."]
32354#[derive(Debug, Clone, PartialEq)]
32355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32357pub struct ILLUMINATOR_STATUS_DATA {
32358    #[doc = "Time since the start-up of the illuminator in ms"]
32359    pub uptime_ms: u32,
32360    #[doc = "Errors"]
32361    pub error_status: IlluminatorErrorFlags,
32362    #[doc = "Illuminator brightness"]
32363    pub brightness: f32,
32364    #[doc = "Illuminator strobing period in seconds"]
32365    pub strobe_period: f32,
32366    #[doc = "Illuminator strobing duty cycle"]
32367    pub strobe_duty_cycle: f32,
32368    #[doc = "Temperature in Celsius"]
32369    pub temp_c: f32,
32370    #[doc = "Minimum strobing period in seconds"]
32371    pub min_strobe_period: f32,
32372    #[doc = "Maximum strobing period in seconds"]
32373    pub max_strobe_period: f32,
32374    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
32375    pub enable: u8,
32376    #[doc = "Supported illuminator modes"]
32377    pub mode_bitmask: IlluminatorMode,
32378    #[doc = "Illuminator mode"]
32379    pub mode: IlluminatorMode,
32380}
32381impl ILLUMINATOR_STATUS_DATA {
32382    pub const ENCODED_LEN: usize = 35usize;
32383    pub const DEFAULT: Self = Self {
32384        uptime_ms: 0_u32,
32385        error_status: IlluminatorErrorFlags::DEFAULT,
32386        brightness: 0.0_f32,
32387        strobe_period: 0.0_f32,
32388        strobe_duty_cycle: 0.0_f32,
32389        temp_c: 0.0_f32,
32390        min_strobe_period: 0.0_f32,
32391        max_strobe_period: 0.0_f32,
32392        enable: 0_u8,
32393        mode_bitmask: IlluminatorMode::DEFAULT,
32394        mode: IlluminatorMode::DEFAULT,
32395    };
32396    #[cfg(feature = "arbitrary")]
32397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32398        use arbitrary::{Arbitrary, Unstructured};
32399        let mut buf = [0u8; 1024];
32400        rng.fill_bytes(&mut buf);
32401        let mut unstructured = Unstructured::new(&buf);
32402        Self::arbitrary(&mut unstructured).unwrap_or_default()
32403    }
32404}
32405impl Default for ILLUMINATOR_STATUS_DATA {
32406    fn default() -> Self {
32407        Self::DEFAULT.clone()
32408    }
32409}
32410impl MessageData for ILLUMINATOR_STATUS_DATA {
32411    type Message = MavMessage;
32412    const ID: u32 = 440u32;
32413    const NAME: &'static str = "ILLUMINATOR_STATUS";
32414    const EXTRA_CRC: u8 = 66u8;
32415    const ENCODED_LEN: usize = 35usize;
32416    fn deser(
32417        _version: MavlinkVersion,
32418        __input: &[u8],
32419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32420        let avail_len = __input.len();
32421        let mut payload_buf = [0; Self::ENCODED_LEN];
32422        let mut buf = if avail_len < Self::ENCODED_LEN {
32423            payload_buf[0..avail_len].copy_from_slice(__input);
32424            Bytes::new(&payload_buf)
32425        } else {
32426            Bytes::new(__input)
32427        };
32428        let mut __struct = Self::default();
32429        __struct.uptime_ms = buf.get_u32_le();
32430        let tmp = buf.get_u32_le();
32431        __struct.error_status = IlluminatorErrorFlags::from_bits(
32432            tmp & IlluminatorErrorFlags::all().bits(),
32433        )
32434        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32435            flag_type: "IlluminatorErrorFlags",
32436            value: tmp as u32,
32437        })?;
32438        __struct.brightness = buf.get_f32_le();
32439        __struct.strobe_period = buf.get_f32_le();
32440        __struct.strobe_duty_cycle = buf.get_f32_le();
32441        __struct.temp_c = buf.get_f32_le();
32442        __struct.min_strobe_period = buf.get_f32_le();
32443        __struct.max_strobe_period = buf.get_f32_le();
32444        __struct.enable = buf.get_u8();
32445        let tmp = buf.get_u8();
32446        __struct.mode_bitmask =
32447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32448                enum_type: "IlluminatorMode",
32449                value: tmp as u32,
32450            })?;
32451        let tmp = buf.get_u8();
32452        __struct.mode =
32453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32454                enum_type: "IlluminatorMode",
32455                value: tmp as u32,
32456            })?;
32457        Ok(__struct)
32458    }
32459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32460        let mut __tmp = BytesMut::new(bytes);
32461        #[allow(clippy::absurd_extreme_comparisons)]
32462        #[allow(unused_comparisons)]
32463        if __tmp.remaining() < Self::ENCODED_LEN {
32464            panic!(
32465                "buffer is too small (need {} bytes, but got {})",
32466                Self::ENCODED_LEN,
32467                __tmp.remaining(),
32468            )
32469        }
32470        __tmp.put_u32_le(self.uptime_ms);
32471        __tmp.put_u32_le(self.error_status.bits());
32472        __tmp.put_f32_le(self.brightness);
32473        __tmp.put_f32_le(self.strobe_period);
32474        __tmp.put_f32_le(self.strobe_duty_cycle);
32475        __tmp.put_f32_le(self.temp_c);
32476        __tmp.put_f32_le(self.min_strobe_period);
32477        __tmp.put_f32_le(self.max_strobe_period);
32478        __tmp.put_u8(self.enable);
32479        __tmp.put_u8(self.mode_bitmask as u8);
32480        __tmp.put_u8(self.mode as u8);
32481        if matches!(version, MavlinkVersion::V2) {
32482            let len = __tmp.len();
32483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32484        } else {
32485            __tmp.len()
32486        }
32487    }
32488}
32489#[doc = "id: 252"]
32490#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32491#[derive(Debug, Clone, PartialEq)]
32492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32494pub struct NAMED_VALUE_INT_DATA {
32495    #[doc = "Timestamp (time since system boot)."]
32496    pub time_boot_ms: u32,
32497    #[doc = "Signed integer value"]
32498    pub value: i32,
32499    #[doc = "Name of the debug variable"]
32500    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32501    pub name: [u8; 10],
32502}
32503impl NAMED_VALUE_INT_DATA {
32504    pub const ENCODED_LEN: usize = 18usize;
32505    pub const DEFAULT: Self = Self {
32506        time_boot_ms: 0_u32,
32507        value: 0_i32,
32508        name: [0_u8; 10usize],
32509    };
32510    #[cfg(feature = "arbitrary")]
32511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32512        use arbitrary::{Arbitrary, Unstructured};
32513        let mut buf = [0u8; 1024];
32514        rng.fill_bytes(&mut buf);
32515        let mut unstructured = Unstructured::new(&buf);
32516        Self::arbitrary(&mut unstructured).unwrap_or_default()
32517    }
32518}
32519impl Default for NAMED_VALUE_INT_DATA {
32520    fn default() -> Self {
32521        Self::DEFAULT.clone()
32522    }
32523}
32524impl MessageData for NAMED_VALUE_INT_DATA {
32525    type Message = MavMessage;
32526    const ID: u32 = 252u32;
32527    const NAME: &'static str = "NAMED_VALUE_INT";
32528    const EXTRA_CRC: u8 = 44u8;
32529    const ENCODED_LEN: usize = 18usize;
32530    fn deser(
32531        _version: MavlinkVersion,
32532        __input: &[u8],
32533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32534        let avail_len = __input.len();
32535        let mut payload_buf = [0; Self::ENCODED_LEN];
32536        let mut buf = if avail_len < Self::ENCODED_LEN {
32537            payload_buf[0..avail_len].copy_from_slice(__input);
32538            Bytes::new(&payload_buf)
32539        } else {
32540            Bytes::new(__input)
32541        };
32542        let mut __struct = Self::default();
32543        __struct.time_boot_ms = buf.get_u32_le();
32544        __struct.value = buf.get_i32_le();
32545        for v in &mut __struct.name {
32546            let val = buf.get_u8();
32547            *v = val;
32548        }
32549        Ok(__struct)
32550    }
32551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32552        let mut __tmp = BytesMut::new(bytes);
32553        #[allow(clippy::absurd_extreme_comparisons)]
32554        #[allow(unused_comparisons)]
32555        if __tmp.remaining() < Self::ENCODED_LEN {
32556            panic!(
32557                "buffer is too small (need {} bytes, but got {})",
32558                Self::ENCODED_LEN,
32559                __tmp.remaining(),
32560            )
32561        }
32562        __tmp.put_u32_le(self.time_boot_ms);
32563        __tmp.put_i32_le(self.value);
32564        for val in &self.name {
32565            __tmp.put_u8(*val);
32566        }
32567        if matches!(version, MavlinkVersion::V2) {
32568            let len = __tmp.len();
32569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32570        } else {
32571            __tmp.len()
32572        }
32573    }
32574}
32575#[doc = "id: 400"]
32576#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
32577#[derive(Debug, Clone, PartialEq)]
32578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32580pub struct PLAY_TUNE_V2_DATA {
32581    #[doc = "Tune format"]
32582    pub format: TuneFormat,
32583    #[doc = "System ID"]
32584    pub target_system: u8,
32585    #[doc = "Component ID"]
32586    pub target_component: u8,
32587    #[doc = "Tune definition as a NULL-terminated string."]
32588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32589    pub tune: [u8; 248],
32590}
32591impl PLAY_TUNE_V2_DATA {
32592    pub const ENCODED_LEN: usize = 254usize;
32593    pub const DEFAULT: Self = Self {
32594        format: TuneFormat::DEFAULT,
32595        target_system: 0_u8,
32596        target_component: 0_u8,
32597        tune: [0_u8; 248usize],
32598    };
32599    #[cfg(feature = "arbitrary")]
32600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32601        use arbitrary::{Arbitrary, Unstructured};
32602        let mut buf = [0u8; 1024];
32603        rng.fill_bytes(&mut buf);
32604        let mut unstructured = Unstructured::new(&buf);
32605        Self::arbitrary(&mut unstructured).unwrap_or_default()
32606    }
32607}
32608impl Default for PLAY_TUNE_V2_DATA {
32609    fn default() -> Self {
32610        Self::DEFAULT.clone()
32611    }
32612}
32613impl MessageData for PLAY_TUNE_V2_DATA {
32614    type Message = MavMessage;
32615    const ID: u32 = 400u32;
32616    const NAME: &'static str = "PLAY_TUNE_V2";
32617    const EXTRA_CRC: u8 = 110u8;
32618    const ENCODED_LEN: usize = 254usize;
32619    fn deser(
32620        _version: MavlinkVersion,
32621        __input: &[u8],
32622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32623        let avail_len = __input.len();
32624        let mut payload_buf = [0; Self::ENCODED_LEN];
32625        let mut buf = if avail_len < Self::ENCODED_LEN {
32626            payload_buf[0..avail_len].copy_from_slice(__input);
32627            Bytes::new(&payload_buf)
32628        } else {
32629            Bytes::new(__input)
32630        };
32631        let mut __struct = Self::default();
32632        let tmp = buf.get_u32_le();
32633        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
32634            ::mavlink_core::error::ParserError::InvalidEnum {
32635                enum_type: "TuneFormat",
32636                value: tmp as u32,
32637            },
32638        )?;
32639        __struct.target_system = buf.get_u8();
32640        __struct.target_component = buf.get_u8();
32641        for v in &mut __struct.tune {
32642            let val = buf.get_u8();
32643            *v = val;
32644        }
32645        Ok(__struct)
32646    }
32647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32648        let mut __tmp = BytesMut::new(bytes);
32649        #[allow(clippy::absurd_extreme_comparisons)]
32650        #[allow(unused_comparisons)]
32651        if __tmp.remaining() < Self::ENCODED_LEN {
32652            panic!(
32653                "buffer is too small (need {} bytes, but got {})",
32654                Self::ENCODED_LEN,
32655                __tmp.remaining(),
32656            )
32657        }
32658        __tmp.put_u32_le(self.format as u32);
32659        __tmp.put_u8(self.target_system);
32660        __tmp.put_u8(self.target_component);
32661        for val in &self.tune {
32662            __tmp.put_u8(*val);
32663        }
32664        if matches!(version, MavlinkVersion::V2) {
32665            let len = __tmp.len();
32666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32667        } else {
32668            __tmp.len()
32669        }
32670    }
32671}
32672#[doc = "id: 330"]
32673#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
32674#[derive(Debug, Clone, PartialEq)]
32675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32677pub struct OBSTACLE_DISTANCE_DATA {
32678    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32679    pub time_usec: u64,
32680    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
32681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32682    pub distances: [u16; 72],
32683    #[doc = "Minimum distance the sensor can measure."]
32684    pub min_distance: u16,
32685    #[doc = "Maximum distance the sensor can measure."]
32686    pub max_distance: u16,
32687    #[doc = "Class id of the distance sensor type."]
32688    pub sensor_type: MavDistanceSensor,
32689    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
32690    pub increment: u8,
32691    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
32692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32693    pub increment_f: f32,
32694    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
32695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32696    pub angle_offset: f32,
32697    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
32698    #[cfg_attr(feature = "serde", serde(default))]
32699    pub frame: MavFrame,
32700}
32701impl OBSTACLE_DISTANCE_DATA {
32702    pub const ENCODED_LEN: usize = 167usize;
32703    pub const DEFAULT: Self = Self {
32704        time_usec: 0_u64,
32705        distances: [0_u16; 72usize],
32706        min_distance: 0_u16,
32707        max_distance: 0_u16,
32708        sensor_type: MavDistanceSensor::DEFAULT,
32709        increment: 0_u8,
32710        increment_f: 0.0_f32,
32711        angle_offset: 0.0_f32,
32712        frame: MavFrame::DEFAULT,
32713    };
32714    #[cfg(feature = "arbitrary")]
32715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32716        use arbitrary::{Arbitrary, Unstructured};
32717        let mut buf = [0u8; 1024];
32718        rng.fill_bytes(&mut buf);
32719        let mut unstructured = Unstructured::new(&buf);
32720        Self::arbitrary(&mut unstructured).unwrap_or_default()
32721    }
32722}
32723impl Default for OBSTACLE_DISTANCE_DATA {
32724    fn default() -> Self {
32725        Self::DEFAULT.clone()
32726    }
32727}
32728impl MessageData for OBSTACLE_DISTANCE_DATA {
32729    type Message = MavMessage;
32730    const ID: u32 = 330u32;
32731    const NAME: &'static str = "OBSTACLE_DISTANCE";
32732    const EXTRA_CRC: u8 = 23u8;
32733    const ENCODED_LEN: usize = 167usize;
32734    fn deser(
32735        _version: MavlinkVersion,
32736        __input: &[u8],
32737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32738        let avail_len = __input.len();
32739        let mut payload_buf = [0; Self::ENCODED_LEN];
32740        let mut buf = if avail_len < Self::ENCODED_LEN {
32741            payload_buf[0..avail_len].copy_from_slice(__input);
32742            Bytes::new(&payload_buf)
32743        } else {
32744            Bytes::new(__input)
32745        };
32746        let mut __struct = Self::default();
32747        __struct.time_usec = buf.get_u64_le();
32748        for v in &mut __struct.distances {
32749            let val = buf.get_u16_le();
32750            *v = val;
32751        }
32752        __struct.min_distance = buf.get_u16_le();
32753        __struct.max_distance = buf.get_u16_le();
32754        let tmp = buf.get_u8();
32755        __struct.sensor_type =
32756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32757                enum_type: "MavDistanceSensor",
32758                value: tmp as u32,
32759            })?;
32760        __struct.increment = buf.get_u8();
32761        __struct.increment_f = buf.get_f32_le();
32762        __struct.angle_offset = buf.get_f32_le();
32763        let tmp = buf.get_u8();
32764        __struct.frame =
32765            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32766                enum_type: "MavFrame",
32767                value: tmp as u32,
32768            })?;
32769        Ok(__struct)
32770    }
32771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32772        let mut __tmp = BytesMut::new(bytes);
32773        #[allow(clippy::absurd_extreme_comparisons)]
32774        #[allow(unused_comparisons)]
32775        if __tmp.remaining() < Self::ENCODED_LEN {
32776            panic!(
32777                "buffer is too small (need {} bytes, but got {})",
32778                Self::ENCODED_LEN,
32779                __tmp.remaining(),
32780            )
32781        }
32782        __tmp.put_u64_le(self.time_usec);
32783        for val in &self.distances {
32784            __tmp.put_u16_le(*val);
32785        }
32786        __tmp.put_u16_le(self.min_distance);
32787        __tmp.put_u16_le(self.max_distance);
32788        __tmp.put_u8(self.sensor_type as u8);
32789        __tmp.put_u8(self.increment);
32790        __tmp.put_f32_le(self.increment_f);
32791        __tmp.put_f32_le(self.angle_offset);
32792        __tmp.put_u8(self.frame as u8);
32793        if matches!(version, MavlinkVersion::V2) {
32794            let len = __tmp.len();
32795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32796        } else {
32797            __tmp.len()
32798        }
32799    }
32800}
32801#[doc = "id: 12903"]
32802#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
32803#[derive(Debug, Clone, PartialEq)]
32804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32806pub struct OPEN_DRONE_ID_SELF_ID_DATA {
32807    #[doc = "System ID (0 for broadcast)."]
32808    pub target_system: u8,
32809    #[doc = "Component ID (0 for broadcast)."]
32810    pub target_component: u8,
32811    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
32812    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32813    pub id_or_mac: [u8; 20],
32814    #[doc = "Indicates the type of the description field."]
32815    pub description_type: MavOdidDescType,
32816    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
32817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32818    pub description: [u8; 23],
32819}
32820impl OPEN_DRONE_ID_SELF_ID_DATA {
32821    pub const ENCODED_LEN: usize = 46usize;
32822    pub const DEFAULT: Self = Self {
32823        target_system: 0_u8,
32824        target_component: 0_u8,
32825        id_or_mac: [0_u8; 20usize],
32826        description_type: MavOdidDescType::DEFAULT,
32827        description: [0_u8; 23usize],
32828    };
32829    #[cfg(feature = "arbitrary")]
32830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32831        use arbitrary::{Arbitrary, Unstructured};
32832        let mut buf = [0u8; 1024];
32833        rng.fill_bytes(&mut buf);
32834        let mut unstructured = Unstructured::new(&buf);
32835        Self::arbitrary(&mut unstructured).unwrap_or_default()
32836    }
32837}
32838impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
32839    fn default() -> Self {
32840        Self::DEFAULT.clone()
32841    }
32842}
32843impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
32844    type Message = MavMessage;
32845    const ID: u32 = 12903u32;
32846    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
32847    const EXTRA_CRC: u8 = 249u8;
32848    const ENCODED_LEN: usize = 46usize;
32849    fn deser(
32850        _version: MavlinkVersion,
32851        __input: &[u8],
32852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32853        let avail_len = __input.len();
32854        let mut payload_buf = [0; Self::ENCODED_LEN];
32855        let mut buf = if avail_len < Self::ENCODED_LEN {
32856            payload_buf[0..avail_len].copy_from_slice(__input);
32857            Bytes::new(&payload_buf)
32858        } else {
32859            Bytes::new(__input)
32860        };
32861        let mut __struct = Self::default();
32862        __struct.target_system = buf.get_u8();
32863        __struct.target_component = buf.get_u8();
32864        for v in &mut __struct.id_or_mac {
32865            let val = buf.get_u8();
32866            *v = val;
32867        }
32868        let tmp = buf.get_u8();
32869        __struct.description_type =
32870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32871                enum_type: "MavOdidDescType",
32872                value: tmp as u32,
32873            })?;
32874        for v in &mut __struct.description {
32875            let val = buf.get_u8();
32876            *v = val;
32877        }
32878        Ok(__struct)
32879    }
32880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32881        let mut __tmp = BytesMut::new(bytes);
32882        #[allow(clippy::absurd_extreme_comparisons)]
32883        #[allow(unused_comparisons)]
32884        if __tmp.remaining() < Self::ENCODED_LEN {
32885            panic!(
32886                "buffer is too small (need {} bytes, but got {})",
32887                Self::ENCODED_LEN,
32888                __tmp.remaining(),
32889            )
32890        }
32891        __tmp.put_u8(self.target_system);
32892        __tmp.put_u8(self.target_component);
32893        for val in &self.id_or_mac {
32894            __tmp.put_u8(*val);
32895        }
32896        __tmp.put_u8(self.description_type as u8);
32897        for val in &self.description {
32898            __tmp.put_u8(*val);
32899        }
32900        if matches!(version, MavlinkVersion::V2) {
32901            let len = __tmp.len();
32902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32903        } else {
32904            __tmp.len()
32905        }
32906    }
32907}
32908#[doc = "id: 248"]
32909#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32910#[derive(Debug, Clone, PartialEq)]
32911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32913pub struct V2_EXTENSION_DATA {
32914    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32915    pub message_type: u16,
32916    #[doc = "Network ID (0 for broadcast)"]
32917    pub target_network: u8,
32918    #[doc = "System ID (0 for broadcast)"]
32919    pub target_system: u8,
32920    #[doc = "Component ID (0 for broadcast)"]
32921    pub target_component: u8,
32922    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32923    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32924    pub payload: [u8; 249],
32925}
32926impl V2_EXTENSION_DATA {
32927    pub const ENCODED_LEN: usize = 254usize;
32928    pub const DEFAULT: Self = Self {
32929        message_type: 0_u16,
32930        target_network: 0_u8,
32931        target_system: 0_u8,
32932        target_component: 0_u8,
32933        payload: [0_u8; 249usize],
32934    };
32935    #[cfg(feature = "arbitrary")]
32936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32937        use arbitrary::{Arbitrary, Unstructured};
32938        let mut buf = [0u8; 1024];
32939        rng.fill_bytes(&mut buf);
32940        let mut unstructured = Unstructured::new(&buf);
32941        Self::arbitrary(&mut unstructured).unwrap_or_default()
32942    }
32943}
32944impl Default for V2_EXTENSION_DATA {
32945    fn default() -> Self {
32946        Self::DEFAULT.clone()
32947    }
32948}
32949impl MessageData for V2_EXTENSION_DATA {
32950    type Message = MavMessage;
32951    const ID: u32 = 248u32;
32952    const NAME: &'static str = "V2_EXTENSION";
32953    const EXTRA_CRC: u8 = 8u8;
32954    const ENCODED_LEN: usize = 254usize;
32955    fn deser(
32956        _version: MavlinkVersion,
32957        __input: &[u8],
32958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32959        let avail_len = __input.len();
32960        let mut payload_buf = [0; Self::ENCODED_LEN];
32961        let mut buf = if avail_len < Self::ENCODED_LEN {
32962            payload_buf[0..avail_len].copy_from_slice(__input);
32963            Bytes::new(&payload_buf)
32964        } else {
32965            Bytes::new(__input)
32966        };
32967        let mut __struct = Self::default();
32968        __struct.message_type = buf.get_u16_le();
32969        __struct.target_network = buf.get_u8();
32970        __struct.target_system = buf.get_u8();
32971        __struct.target_component = buf.get_u8();
32972        for v in &mut __struct.payload {
32973            let val = buf.get_u8();
32974            *v = val;
32975        }
32976        Ok(__struct)
32977    }
32978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32979        let mut __tmp = BytesMut::new(bytes);
32980        #[allow(clippy::absurd_extreme_comparisons)]
32981        #[allow(unused_comparisons)]
32982        if __tmp.remaining() < Self::ENCODED_LEN {
32983            panic!(
32984                "buffer is too small (need {} bytes, but got {})",
32985                Self::ENCODED_LEN,
32986                __tmp.remaining(),
32987            )
32988        }
32989        __tmp.put_u16_le(self.message_type);
32990        __tmp.put_u8(self.target_network);
32991        __tmp.put_u8(self.target_system);
32992        __tmp.put_u8(self.target_component);
32993        for val in &self.payload {
32994            __tmp.put_u8(*val);
32995        }
32996        if matches!(version, MavlinkVersion::V2) {
32997            let len = __tmp.len();
32998            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32999        } else {
33000            __tmp.len()
33001        }
33002    }
33003}
33004#[derive(Clone, PartialEq, Debug)]
33005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33006#[cfg_attr(feature = "serde", serde(tag = "type"))]
33007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33008#[repr(u32)]
33009pub enum MavMessage {
33010    COMMAND_LONG(COMMAND_LONG_DATA),
33011    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33012    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33013    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33014    PLAY_TUNE(PLAY_TUNE_DATA),
33015    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33016    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33017    DEBUG_VECT(DEBUG_VECT_DATA),
33018    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33019    SENS_MPPT(SENS_MPPT_DATA),
33020    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33021    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33022    DATA_STREAM(DATA_STREAM_DATA),
33023    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33024    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33025    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33026    MISSION_CURRENT(MISSION_CURRENT_DATA),
33027    REQUEST_EVENT(REQUEST_EVENT_DATA),
33028    TUNNEL(TUNNEL_DATA),
33029    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33030    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33031    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33032    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33033    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33034    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33035    LOG_DATA(LOG_DATA_DATA),
33036    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33037    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33038    TIMESYNC(TIMESYNC_DATA),
33039    MISSION_REQUEST(MISSION_REQUEST_DATA),
33040    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
33041    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33042    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33043    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33044    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33045    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33046    LOG_ENTRY(LOG_ENTRY_DATA),
33047    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33048    SENS_POWER(SENS_POWER_DATA),
33049    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33050    GPS2_RAW(GPS2_RAW_DATA),
33051    FENCE_STATUS(FENCE_STATUS_DATA),
33052    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33053    DEBUG(DEBUG_DATA),
33054    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33055    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33056    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33057    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33058    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33059    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33060    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33061    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33062    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33063    HOME_POSITION(HOME_POSITION_DATA),
33064    SCALED_IMU3(SCALED_IMU3_DATA),
33065    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33066    ESC_INFO(ESC_INFO_DATA),
33067    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33068    TERRAIN_DATA(TERRAIN_DATA_DATA),
33069    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33070    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33071    ALTITUDE(ALTITUDE_DATA),
33072    SYS_STATUS(SYS_STATUS_DATA),
33073    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
33074    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33075    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33076    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33077    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
33078    STATUSTEXT(STATUSTEXT_DATA),
33079    RAW_IMU(RAW_IMU_DATA),
33080    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33081    SIM_STATE(SIM_STATE_DATA),
33082    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33083    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33084    ODOMETRY(ODOMETRY_DATA),
33085    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33086    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33087    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33088    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33089    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33090    WINCH_STATUS(WINCH_STATUS_DATA),
33091    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33092    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33093    MISSION_COUNT(MISSION_COUNT_DATA),
33094    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33095    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33096    MISSION_ACK(MISSION_ACK_DATA),
33097    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33098    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33099    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33100    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33101    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33102    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33103    EFI_STATUS(EFI_STATUS_DATA),
33104    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33105    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33106    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33107    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
33108    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33109    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33110    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33111    COLLISION(COLLISION_DATA),
33112    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33113    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33114    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33115    WIND_COV(WIND_COV_DATA),
33116    ASL_OBCTRL(ASL_OBCTRL_DATA),
33117    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33118    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33119    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33120    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33121    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33122    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33123    RAW_PRESSURE(RAW_PRESSURE_DATA),
33124    LOG_ERASE(LOG_ERASE_DATA),
33125    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33126    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33127    MEMORY_VECT(MEMORY_VECT_DATA),
33128    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33129    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33130    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33131    SCALED_IMU2(SCALED_IMU2_DATA),
33132    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33133    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33134    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33135    SETUP_SIGNING(SETUP_SIGNING_DATA),
33136    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33137    SYSTEM_TIME(SYSTEM_TIME_DATA),
33138    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33139    CURRENT_MODE(CURRENT_MODE_DATA),
33140    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33141    FUEL_STATUS(FUEL_STATUS_DATA),
33142    RAW_RPM(RAW_RPM_DATA),
33143    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33144    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33145    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33146    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33147    RC_CHANNELS(RC_CHANNELS_DATA),
33148    GPS_RAW_INT(GPS_RAW_INT_DATA),
33149    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33150    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
33151    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33152    HIGHRES_IMU(HIGHRES_IMU_DATA),
33153    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33154    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33155    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33156    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33157    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33158    GPS_STATUS(GPS_STATUS_DATA),
33159    VIBRATION(VIBRATION_DATA),
33160    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33161    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33162    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33163    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33164    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33165    HEARTBEAT(HEARTBEAT_DATA),
33166    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33167    LOGGING_DATA(LOGGING_DATA_DATA),
33168    SENS_BATMON(SENS_BATMON_DATA),
33169    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
33170    ATTITUDE(ATTITUDE_DATA),
33171    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33172    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33173    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33174    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33175    AIS_VESSEL(AIS_VESSEL_DATA),
33176    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33177    GPS2_RTK(GPS2_RTK_DATA),
33178    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33179    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33180    GPS_INPUT(GPS_INPUT_DATA),
33181    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33182    HIL_SENSOR(HIL_SENSOR_DATA),
33183    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33184    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33185    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33186    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33187    POWER_STATUS(POWER_STATUS_DATA),
33188    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33189    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33190    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33191    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33192    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
33193    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33194    LANDING_TARGET(LANDING_TARGET_DATA),
33195    VFR_HUD(VFR_HUD_DATA),
33196    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33197    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33198    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33199    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33200    SENS_ATMOS(SENS_ATMOS_DATA),
33201    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33202    SCALED_IMU(SCALED_IMU_DATA),
33203    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33204    AUTH_KEY(AUTH_KEY_DATA),
33205    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33206    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33207    HIL_CONTROLS(HIL_CONTROLS_DATA),
33208    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33209    ESC_STATUS(ESC_STATUS_DATA),
33210    CAN_FRAME(CAN_FRAME_DATA),
33211    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33212    MISSION_ITEM(MISSION_ITEM_DATA),
33213    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33214    HIGH_LATENCY(HIGH_LATENCY_DATA),
33215    HIL_GPS(HIL_GPS_DATA),
33216    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33217    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
33218    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
33219    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33220    PING(PING_DATA),
33221    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33222    GPS_RTK(GPS_RTK_DATA),
33223    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
33224    LOGGING_ACK(LOGGING_ACK_DATA),
33225    COMMAND_ACK(COMMAND_ACK_DATA),
33226    RADIO_STATUS(RADIO_STATUS_DATA),
33227    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33228    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33229    SET_MODE(SET_MODE_DATA),
33230    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33231    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33232    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33233    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33234    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33235    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33236    BATTERY_STATUS(BATTERY_STATUS_DATA),
33237    COMMAND_INT(COMMAND_INT_DATA),
33238    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33239    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
33240    HIL_STATE(HIL_STATE_DATA),
33241    EKF_EXT(EKF_EXT_DATA),
33242    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33243    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33244    PARAM_SET(PARAM_SET_DATA),
33245    PARAM_VALUE(PARAM_VALUE_DATA),
33246    CANFD_FRAME(CANFD_FRAME_DATA),
33247    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33248    EVENT(EVENT_DATA),
33249    BATTERY_INFO(BATTERY_INFO_DATA),
33250    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33251    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33252    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33253    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33254    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33255    V2_EXTENSION(V2_EXTENSION_DATA),
33256}
33257impl MavMessage {
33258    pub const fn all_ids() -> &'static [u32] {
33259        &[
33260            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33261            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33262            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33263            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33264            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33265            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33266            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33267            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33268            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33269            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33270            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
33271            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
33272            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
33273            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
33274            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
33275            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
33276            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
33277            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
33278            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
33279            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
33280            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
33281            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
33282            12918u32, 12919u32, 12920u32,
33283        ]
33284    }
33285}
33286impl Message for MavMessage {
33287    fn parse(
33288        version: MavlinkVersion,
33289        id: u32,
33290        payload: &[u8],
33291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33292        match id {
33293            COMMAND_LONG_DATA::ID => {
33294                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33295            }
33296            ADSB_VEHICLE_DATA::ID => {
33297                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33298            }
33299            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33300                .map(Self::LOCAL_POSITION_NED_COV),
33301            VISION_POSITION_ESTIMATE_DATA::ID => {
33302                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33303                    .map(Self::VISION_POSITION_ESTIMATE)
33304            }
33305            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33306            MESSAGE_INTERVAL_DATA::ID => {
33307                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33308            }
33309            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33310                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33311                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33312            }
33313            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33314            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33315                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33316            }
33317            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
33318            PARAM_REQUEST_LIST_DATA::ID => {
33319                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33320            }
33321            HIGH_LATENCY2_DATA::ID => {
33322                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33323            }
33324            DATA_STREAM_DATA::ID => {
33325                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33326            }
33327            HYGROMETER_SENSOR_DATA::ID => {
33328                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33329            }
33330            CELLULAR_STATUS_DATA::ID => {
33331                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33332            }
33333            MISSION_CLEAR_ALL_DATA::ID => {
33334                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33335            }
33336            MISSION_CURRENT_DATA::ID => {
33337                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33338            }
33339            REQUEST_EVENT_DATA::ID => {
33340                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33341            }
33342            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
33343            VISION_SPEED_ESTIMATE_DATA::ID => {
33344                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
33345            }
33346            RESOURCE_REQUEST_DATA::ID => {
33347                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33348            }
33349            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33350                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33351            }
33352            GLOBAL_POSITION_INT_COV_DATA::ID => {
33353                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33354                    .map(Self::GLOBAL_POSITION_INT_COV)
33355            }
33356            ESTIMATOR_STATUS_DATA::ID => {
33357                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33358            }
33359            ISBD_LINK_STATUS_DATA::ID => {
33360                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33361            }
33362            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33363            ENCAPSULATED_DATA_DATA::ID => {
33364                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33365            }
33366            PARAM_EXT_VALUE_DATA::ID => {
33367                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33368            }
33369            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
33370            MISSION_REQUEST_DATA::ID => {
33371                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33372            }
33373            SATCOM_LINK_STATUS_DATA::ID => {
33374                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
33375            }
33376            CAMERA_TRIGGER_DATA::ID => {
33377                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33378            }
33379            CAMERA_THERMAL_RANGE_DATA::ID => {
33380                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33381            }
33382            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33383                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33384                    .map(Self::ACTUATOR_CONTROL_TARGET)
33385            }
33386            REQUEST_DATA_STREAM_DATA::ID => {
33387                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33388            }
33389            AVAILABLE_MODES_DATA::ID => {
33390                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33391            }
33392            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33393            MISSION_ITEM_INT_DATA::ID => {
33394                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33395            }
33396            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
33397            CAMERA_SETTINGS_DATA::ID => {
33398                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33399            }
33400            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33401            FENCE_STATUS_DATA::ID => {
33402                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33403            }
33404            FOLLOW_TARGET_DATA::ID => {
33405                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33406            }
33407            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33408            DISTANCE_SENSOR_DATA::ID => {
33409                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33410            }
33411            MISSION_ITEM_REACHED_DATA::ID => {
33412                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33413            }
33414            RC_CHANNELS_SCALED_DATA::ID => {
33415                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33416            }
33417            PARAM_EXT_ACK_DATA::ID => {
33418                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33419            }
33420            AUTOPILOT_VERSION_DATA::ID => {
33421                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33422            }
33423            VICON_POSITION_ESTIMATE_DATA::ID => {
33424                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
33425                    .map(Self::VICON_POSITION_ESTIMATE)
33426            }
33427            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33428                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33429                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33430            }
33431            VIDEO_STREAM_INFORMATION_DATA::ID => {
33432                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
33433                    .map(Self::VIDEO_STREAM_INFORMATION)
33434            }
33435            LOGGING_DATA_ACKED_DATA::ID => {
33436                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33437            }
33438            HOME_POSITION_DATA::ID => {
33439                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33440            }
33441            SCALED_IMU3_DATA::ID => {
33442                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33443            }
33444            PARAM_EXT_SET_DATA::ID => {
33445                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33446            }
33447            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33448            BUTTON_CHANGE_DATA::ID => {
33449                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33450            }
33451            TERRAIN_DATA_DATA::ID => {
33452                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
33453            }
33454            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33455                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33456                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33457            }
33458            GPS_RTCM_DATA_DATA::ID => {
33459                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33460            }
33461            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33462            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
33463            COMMAND_LONG_STAMPED_DATA::ID => {
33464                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
33465            }
33466            ATTITUDE_QUATERNION_DATA::ID => {
33467                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33468            }
33469            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33470                .map(Self::ACTUATOR_OUTPUT_STATUS),
33471            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33472                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33473                    .map(Self::POSITION_TARGET_LOCAL_NED)
33474            }
33475            SENS_POWER_BOARD_DATA::ID => {
33476                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
33477            }
33478            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
33479            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33480            MANUAL_SETPOINT_DATA::ID => {
33481                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33482            }
33483            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
33484            ATT_POS_MOCAP_DATA::ID => {
33485                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33486            }
33487            VIDEO_STREAM_STATUS_DATA::ID => {
33488                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
33489            }
33490            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33491            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33492                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33493                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33494            }
33495            SET_HOME_POSITION_DATA::ID => {
33496                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
33497            }
33498            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33499                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33500                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33501            }
33502            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33503                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33504                    .map(Self::CHANGE_OPERATOR_CONTROL)
33505            }
33506            WHEEL_DISTANCE_DATA::ID => {
33507                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
33508            }
33509            WINCH_STATUS_DATA::ID => {
33510                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
33511            }
33512            STORAGE_INFORMATION_DATA::ID => {
33513                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
33514            }
33515            TERRAIN_REPORT_DATA::ID => {
33516                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
33517            }
33518            MISSION_COUNT_DATA::ID => {
33519                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33520            }
33521            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33522                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33523                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33524            }
33525            SCALED_PRESSURE_DATA::ID => {
33526                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33527            }
33528            MISSION_ACK_DATA::ID => {
33529                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33530            }
33531            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33532                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33533                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33534            }
33535            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33536                .map(Self::OPEN_DRONE_ID_LOCATION),
33537            DEBUG_FLOAT_ARRAY_DATA::ID => {
33538                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33539            }
33540            RESPONSE_EVENT_ERROR_DATA::ID => {
33541                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33542            }
33543            CELLULAR_CONFIG_DATA::ID => {
33544                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33545            }
33546            GPS_GLOBAL_ORIGIN_DATA::ID => {
33547                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33548            }
33549            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33550            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33551                .map(Self::PARAM_EXT_REQUEST_READ),
33552            ATTITUDE_TARGET_DATA::ID => {
33553                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33554            }
33555            EXTENDED_SYS_STATE_DATA::ID => {
33556                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33557            }
33558            COMMAND_INT_STAMPED_DATA::ID => {
33559                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
33560            }
33561            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
33562                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
33563            }
33564            GIMBAL_MANAGER_STATUS_DATA::ID => {
33565                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33566            }
33567            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
33568                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33569                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
33570            }
33571            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33572            MOUNT_ORIENTATION_DATA::ID => {
33573                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33574            }
33575            FLIGHT_INFORMATION_DATA::ID => {
33576                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33577            }
33578            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33579                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33580                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33581            }
33582            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
33583            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
33584            CAMERA_FOV_STATUS_DATA::ID => {
33585                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33586            }
33587            CONTROL_SYSTEM_STATE_DATA::ID => {
33588                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33589            }
33590            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33591                .map(Self::PARAM_EXT_REQUEST_LIST),
33592            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33593                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33594                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33595            }
33596            SAFETY_ALLOWED_AREA_DATA::ID => {
33597                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33598            }
33599            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33600                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33601                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33602            }
33603            RAW_PRESSURE_DATA::ID => {
33604                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33605            }
33606            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33607            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
33608                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33609                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
33610            }
33611            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33612                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33613                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33614            }
33615            MEMORY_VECT_DATA::ID => {
33616                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33617            }
33618            AVAILABLE_MODES_MONITOR_DATA::ID => {
33619                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33620                    .map(Self::AVAILABLE_MODES_MONITOR)
33621            }
33622            TERRAIN_REQUEST_DATA::ID => {
33623                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
33624            }
33625            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33626                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33627                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33628            }
33629            SCALED_IMU2_DATA::ID => {
33630                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33631            }
33632            SERIAL_CONTROL_DATA::ID => {
33633                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
33634            }
33635            MISSION_REQUEST_INT_DATA::ID => {
33636                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33637            }
33638            TERRAIN_CHECK_DATA::ID => {
33639                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
33640            }
33641            SETUP_SIGNING_DATA::ID => {
33642                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
33643            }
33644            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33645                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33646                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33647            }
33648            SYSTEM_TIME_DATA::ID => {
33649                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
33650            }
33651            CAMERA_INFORMATION_DATA::ID => {
33652                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33653            }
33654            CURRENT_MODE_DATA::ID => {
33655                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33656            }
33657            MISSION_REQUEST_LIST_DATA::ID => {
33658                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33659            }
33660            FUEL_STATUS_DATA::ID => {
33661                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33662            }
33663            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33664            PARAM_REQUEST_READ_DATA::ID => {
33665                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33666            }
33667            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33668                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33669            }
33670            SET_ATTITUDE_TARGET_DATA::ID => {
33671                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
33672            }
33673            UAVCAN_NODE_INFO_DATA::ID => {
33674                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
33675            }
33676            RC_CHANNELS_DATA::ID => {
33677                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33678            }
33679            GPS_RAW_INT_DATA::ID => {
33680                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33681            }
33682            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33683                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33684                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33685            }
33686            GSM_LINK_STATUS_DATA::ID => {
33687                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
33688            }
33689            UTM_GLOBAL_POSITION_DATA::ID => {
33690                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
33691            }
33692            HIGHRES_IMU_DATA::ID => {
33693                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33694            }
33695            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33696                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33697                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33698            }
33699            UAVCAN_NODE_STATUS_DATA::ID => {
33700                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
33701            }
33702            HIL_RC_INPUTS_RAW_DATA::ID => {
33703                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33704            }
33705            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33706                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33707                    .map(Self::ONBOARD_COMPUTER_STATUS)
33708            }
33709            PARAM_MAP_RC_DATA::ID => {
33710                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33711            }
33712            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33713            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
33714            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33715                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
33716                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
33717            }
33718            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33719                .map(Self::ORBIT_EXECUTION_STATUS),
33720            LINK_NODE_STATUS_DATA::ID => {
33721                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33722            }
33723            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33724                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33725            }
33726            ATTITUDE_QUATERNION_COV_DATA::ID => {
33727                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33728                    .map(Self::ATTITUDE_QUATERNION_COV)
33729            }
33730            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33731            MAG_CAL_REPORT_DATA::ID => {
33732                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33733            }
33734            LOGGING_DATA_DATA::ID => {
33735                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33736            }
33737            SENS_BATMON_DATA::ID => {
33738                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
33739            }
33740            FW_SOARING_DATA_DATA::ID => {
33741                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
33742            }
33743            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33744            WIFI_CONFIG_AP_DATA::ID => {
33745                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
33746            }
33747            MISSION_SET_CURRENT_DATA::ID => {
33748                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33749            }
33750            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
33751                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
33752                    .map(Self::TIME_ESTIMATE_TO_TARGET)
33753            }
33754            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33755                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
33756                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
33757            }
33758            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33759            MANUAL_CONTROL_DATA::ID => {
33760                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33761            }
33762            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33763            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33764                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33765                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
33766            }
33767            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33768                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33769                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33770            }
33771            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33772            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33773                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33774                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33775            }
33776            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33777            HIL_STATE_QUATERNION_DATA::ID => {
33778                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33779            }
33780            LOG_REQUEST_DATA_DATA::ID => {
33781                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33782            }
33783            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33784                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33785                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33786            }
33787            OPTICAL_FLOW_RAD_DATA::ID => {
33788                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33789            }
33790            POWER_STATUS_DATA::ID => {
33791                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33792            }
33793            COMMAND_CANCEL_DATA::ID => {
33794                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33795            }
33796            PROTOCOL_VERSION_DATA::ID => {
33797                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33798            }
33799            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33800                .map(Self::CURRENT_EVENT_SEQUENCE),
33801            RC_CHANNELS_RAW_DATA::ID => {
33802                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33803            }
33804            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
33805                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
33806            }
33807            GENERATOR_STATUS_DATA::ID => {
33808                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33809            }
33810            LANDING_TARGET_DATA::ID => {
33811                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33812            }
33813            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
33814            LOG_REQUEST_END_DATA::ID => {
33815                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33816            }
33817            CAN_FILTER_MODIFY_DATA::ID => {
33818                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33819            }
33820            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33821                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33822                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33823            }
33824            CAMERA_CAPTURE_STATUS_DATA::ID => {
33825                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33826            }
33827            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
33828            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33829                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33830                    .map(Self::COMPONENT_INFORMATION_BASIC)
33831            }
33832            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33833            RC_CHANNELS_OVERRIDE_DATA::ID => {
33834                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33835            }
33836            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33837            GLOBAL_POSITION_INT_DATA::ID => {
33838                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33839            }
33840            LOG_REQUEST_LIST_DATA::ID => {
33841                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33842            }
33843            HIL_CONTROLS_DATA::ID => {
33844                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33845            }
33846            SMART_BATTERY_INFO_DATA::ID => {
33847                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
33848            }
33849            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33850            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33851            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33852                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33853                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33854            }
33855            MISSION_ITEM_DATA::ID => {
33856                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33857            }
33858            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33859                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33860            HIGH_LATENCY_DATA::ID => {
33861                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33862            }
33863            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33864            COMPONENT_METADATA_DATA::ID => {
33865                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33866            }
33867            ASLUAV_STATUS_DATA::ID => {
33868                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
33869            }
33870            ASLCTRL_DATA_DATA::ID => {
33871                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
33872            }
33873            SUPPORTED_TUNES_DATA::ID => {
33874                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
33875            }
33876            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33877            COMPONENT_INFORMATION_DATA::ID => {
33878                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33879            }
33880            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33881            SENSORPOD_STATUS_DATA::ID => {
33882                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
33883            }
33884            LOGGING_ACK_DATA::ID => {
33885                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33886            }
33887            COMMAND_ACK_DATA::ID => {
33888                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33889            }
33890            RADIO_STATUS_DATA::ID => {
33891                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33892            }
33893            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33894                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33895                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33896            }
33897            LOCAL_POSITION_NED_DATA::ID => {
33898                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33899            }
33900            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
33901            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33902                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33903                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33904            }
33905            SCALED_PRESSURE3_DATA::ID => {
33906                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
33907            }
33908            NAMED_VALUE_FLOAT_DATA::ID => {
33909                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33910            }
33911            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33912                .map(Self::FILE_TRANSFER_PROTOCOL),
33913            SCALED_PRESSURE2_DATA::ID => {
33914                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
33915            }
33916            OPTICAL_FLOW_DATA::ID => {
33917                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33918            }
33919            BATTERY_STATUS_DATA::ID => {
33920                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33921            }
33922            COMMAND_INT_DATA::ID => {
33923                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33924            }
33925            SERVO_OUTPUT_RAW_DATA::ID => {
33926                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
33927            }
33928            ASLCTRL_DEBUG_DATA::ID => {
33929                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
33930            }
33931            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33932            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
33933            GPS_INJECT_DATA_DATA::ID => {
33934                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33935            }
33936            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33937                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33938                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33939            }
33940            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33941            PARAM_VALUE_DATA::ID => {
33942                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33943            }
33944            CANFD_FRAME_DATA::ID => {
33945                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33946            }
33947            HIL_OPTICAL_FLOW_DATA::ID => {
33948                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33949            }
33950            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33951            BATTERY_INFO_DATA::ID => {
33952                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33953            }
33954            ILLUMINATOR_STATUS_DATA::ID => {
33955                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33956            }
33957            NAMED_VALUE_INT_DATA::ID => {
33958                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33959            }
33960            PLAY_TUNE_V2_DATA::ID => {
33961                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33962            }
33963            OBSTACLE_DISTANCE_DATA::ID => {
33964                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33965            }
33966            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33967                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33968            }
33969            V2_EXTENSION_DATA::ID => {
33970                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
33971            }
33972            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
33973        }
33974    }
33975    fn message_name(&self) -> &'static str {
33976        match self {
33977            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
33978            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
33979            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
33980            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
33981            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
33982            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
33983            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33984            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
33985            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
33986            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
33987            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
33988            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
33989            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
33990            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
33991            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
33992            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
33993            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
33994            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
33995            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
33996            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
33997            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
33998            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
33999            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34000            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34001            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34002            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34003            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34004            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34005            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34006            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34007            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
34008            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34009            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34010            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34011            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34012            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34013            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34014            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34015            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
34016            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34017            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34018            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34019            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34020            Self::DEBUG(..) => DEBUG_DATA::NAME,
34021            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34022            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34023            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34024            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34025            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34026            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34027            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34028            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34029            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34030            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34031            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34032            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34033            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34034            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34035            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34036            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34037            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34038            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34039            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34040            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
34041            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34042            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34043            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34044            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
34045            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34046            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34047            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34048            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34049            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34050            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34051            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34052            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34053            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34054            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34055            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34056            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34057            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34058            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34059            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34060            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34061            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34062            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34063            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34064            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34065            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34066            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34067            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34068            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34069            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34070            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34071            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34072            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34073            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34074            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
34075            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34076            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34077            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34078            Self::COLLISION(..) => COLLISION_DATA::NAME,
34079            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34080            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34081            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34082            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34083            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
34084            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34085            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34086            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34087            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34088            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34089            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34090                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34091            }
34092            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34093            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34094            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34095            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34096            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34097            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34098            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34099            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34100            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34101            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34102            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34103            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34104            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34105            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34106            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34107            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34108            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34109            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34110            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34111            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34112            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34113            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34114            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34115            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34116            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34117            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34118            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34119                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34120            }
34121            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
34122            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34123            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34124            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34125            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34126            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34127            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34128            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34129            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34130            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34131            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34132                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34133            }
34134            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34135            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34136            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34137            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34138            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34139            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34140            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34141            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
34142            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
34143            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34144            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34145            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34146            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34147            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34148                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34149            }
34150            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34151            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34152            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34153            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34154            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34155            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34156            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34157                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34158            }
34159            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34160            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34161            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34162            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34163            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34164            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34165            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34166            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34167            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34168            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34169            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
34170            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34171            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34172            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34173            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34174            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34175            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34176            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34177            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
34178            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34179            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34180            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34181            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34182            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34183            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34184            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34185            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34186            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34187            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34188            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34189            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34190            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34191            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34192            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34193            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34194            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
34195            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
34196            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34197            Self::PING(..) => PING_DATA::NAME,
34198            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34199            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34200            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
34201            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34202            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34203            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34204            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34205            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34206            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34207            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34208            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34209            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34210            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34211            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34212            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34213            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34214            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34215            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34216            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
34217            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34218            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
34219            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34220            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34221            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34222            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34223            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34224            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34225            Self::EVENT(..) => EVENT_DATA::NAME,
34226            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34227            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34228            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34229            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34230            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34231            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34232            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34233        }
34234    }
34235    fn message_id(&self) -> u32 {
34236        match self {
34237            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34238            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34239            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34240            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34241            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34242            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34243            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34244            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34245            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34246            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
34247            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34248            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34249            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34250            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34251            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34252            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34253            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34254            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34255            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34256            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34257            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34258            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34259            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34260            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34261            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34262            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34263            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34264            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34265            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34266            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34267            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
34268            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34269            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34270            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34271            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34272            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34273            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34274            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34275            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
34276            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34277            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34278            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34279            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34280            Self::DEBUG(..) => DEBUG_DATA::ID,
34281            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34282            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34283            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34284            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34285            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34286            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34287            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34288            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34289            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34290            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34291            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34292            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34293            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34294            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34295            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34296            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34297            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34298            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34299            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34300            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
34301            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34302            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34303            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34304            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
34305            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34306            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34307            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34308            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34309            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34310            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34311            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34312            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34313            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34314            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34315            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34316            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34317            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34318            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34319            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34320            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34321            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34322            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34323            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34324            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34325            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34326            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34327            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34328            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34329            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34330            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34331            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34332            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34333            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34334            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
34335            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34336            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34337            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34338            Self::COLLISION(..) => COLLISION_DATA::ID,
34339            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34340            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34341            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34342            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34343            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
34344            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34345            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34346            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34347            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34348            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34349            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34350                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34351            }
34352            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34353            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34354            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34355            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34356            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34357            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34358            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34359            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34360            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34361            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34362            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34363            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34364            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34365            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34366            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34367            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34368            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34369            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34370            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34371            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34372            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34373            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34374            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34375            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34376            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34377            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34378            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34379                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34380            }
34381            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
34382            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34383            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34384            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34385            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34386            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34387            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34388            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34389            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34390            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34391            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34392            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34393            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34394            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34395            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34396            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34397            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34398            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34399            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
34400            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
34401            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34402            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34403            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34404            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34405            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34406                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34407            }
34408            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34409            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34410            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34411            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34412            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34413            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34414            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34415                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34416            }
34417            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34418            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34419            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34420            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34421            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34422            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34423            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34424            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34425            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34426            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34427            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
34428            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34429            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34430            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34431            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34432            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34433            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34434            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34435            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
34436            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34437            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34438            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34439            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34440            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34441            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34442            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34443            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34444            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34445            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34446            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34447            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34448            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34449            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34450            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34451            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34452            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
34453            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
34454            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34455            Self::PING(..) => PING_DATA::ID,
34456            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34457            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34458            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
34459            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34460            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34461            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34462            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34463            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34464            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34465            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34466            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34467            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34468            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34469            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34470            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34471            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34472            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34473            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34474            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
34475            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34476            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
34477            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34478            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34479            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34480            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34481            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34482            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34483            Self::EVENT(..) => EVENT_DATA::ID,
34484            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34485            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34486            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34487            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34488            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34489            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34490            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34491        }
34492    }
34493    fn message_id_from_name(name: &str) -> Option<u32> {
34494        match name {
34495            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34496            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34497            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34498            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34499            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34500            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34501            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34502            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34503            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34504            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
34505            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34506            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34507            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34508            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34509            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34510            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34511            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34512            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34513            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34514            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34515            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34516            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34517            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34518            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34519            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34520            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34521            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34522            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34523            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34524            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34525            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
34526            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34527            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34528            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34529            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34530            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34531            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34532            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34533            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
34534            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34535            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34536            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34537            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34538            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34539            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34540            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34541            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34542            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34543            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34544            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34545            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34546            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34547            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34548            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34549            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34550            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34551            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34552            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34553            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34554            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34555            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34556            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34557            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34558            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
34559            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34560            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34561            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34562            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
34563            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34564            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34565            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34566            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34567            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34568            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34569            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34570            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34571            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34572            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34573            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34574            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34575            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34576            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34577            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34578            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34579            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34580            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34581            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34582            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34583            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34584            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34585            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34586            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34587            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34588            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34589            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34590            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34591            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34592            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
34593            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34594            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34595            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34596                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34597            }
34598            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34599            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34600            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34601            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34602            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34603            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
34604            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34605            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34606            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34607            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34608            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34609            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34610                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34611            }
34612            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34613            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34614            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34615            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34616                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34617            }
34618            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34619            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34620            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34621            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34622            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34623            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34624            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34625            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34626            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34627            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34628            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34629            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34630            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34631            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34632            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34633            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34634            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34635            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34636            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34637            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34638            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34639            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34640            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34641                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34642            }
34643            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
34644            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34645            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34646            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34647            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34648            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34649            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34650            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34651            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34652            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34653            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34654                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34655            }
34656            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34657            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34658            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34659            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34660            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34661            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34662            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34663            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
34664            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
34665            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34666            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34667            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34668            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34669            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34670                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34671            }
34672            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34673            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34674            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34675            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34676                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34677            }
34678            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34679            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34680            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34681                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34682            }
34683            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34684            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34685            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34686            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34687            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34688            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34689            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34690            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34691            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34692            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34693            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
34694            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34695            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34696            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34697            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34698            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34699            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34700            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34701            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
34702            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34703            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34704            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34705            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34706            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34707            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34708            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34709            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34710            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34711            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34712            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34713            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34714            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34715            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34716            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34717            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34718            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
34719            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
34720            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34721            PING_DATA::NAME => Some(PING_DATA::ID),
34722            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34723            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34724            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
34725            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34726            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34727            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34728            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34729            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34730            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34731            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34732                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34733            }
34734            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34735            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34736            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34737            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34738            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34739            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34740            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34741            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34742            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
34743            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34744            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
34745            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34746            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34747            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34748            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34749            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34750            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34751            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34752            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34753            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34754            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34755            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34756            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34757            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34758            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34759            _ => None,
34760        }
34761    }
34762    fn default_message_from_id(id: u32) -> Option<Self> {
34763        match id {
34764            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34765            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34766            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
34767                LOCAL_POSITION_NED_COV_DATA::default(),
34768            )),
34769            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34770                VISION_POSITION_ESTIMATE_DATA::default(),
34771            )),
34772            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
34773            MESSAGE_INTERVAL_DATA::ID => {
34774                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
34775            }
34776            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
34777                GIMBAL_MANAGER_INFORMATION_DATA::default(),
34778            )),
34779            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34780            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
34781                HIL_ACTUATOR_CONTROLS_DATA::default(),
34782            )),
34783            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
34784            PARAM_REQUEST_LIST_DATA::ID => {
34785                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
34786            }
34787            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
34788            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34789            HYGROMETER_SENSOR_DATA::ID => {
34790                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
34791            }
34792            CELLULAR_STATUS_DATA::ID => {
34793                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34794            }
34795            MISSION_CLEAR_ALL_DATA::ID => {
34796                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
34797            }
34798            MISSION_CURRENT_DATA::ID => {
34799                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
34800            }
34801            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
34802            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
34803            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34804                VISION_SPEED_ESTIMATE_DATA::default(),
34805            )),
34806            RESOURCE_REQUEST_DATA::ID => {
34807                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
34808            }
34809            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
34810                NAV_CONTROLLER_OUTPUT_DATA::default(),
34811            )),
34812            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
34813                GLOBAL_POSITION_INT_COV_DATA::default(),
34814            )),
34815            ESTIMATOR_STATUS_DATA::ID => {
34816                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34817            }
34818            ISBD_LINK_STATUS_DATA::ID => {
34819                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
34820            }
34821            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
34822            ENCAPSULATED_DATA_DATA::ID => {
34823                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34824            }
34825            PARAM_EXT_VALUE_DATA::ID => {
34826                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
34827            }
34828            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
34829            MISSION_REQUEST_DATA::ID => {
34830                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
34831            }
34832            SATCOM_LINK_STATUS_DATA::ID => {
34833                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
34834            }
34835            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34836            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34837                CAMERA_THERMAL_RANGE_DATA::default(),
34838            )),
34839            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34840                ACTUATOR_CONTROL_TARGET_DATA::default(),
34841            )),
34842            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34843                REQUEST_DATA_STREAM_DATA::default(),
34844            )),
34845            AVAILABLE_MODES_DATA::ID => {
34846                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34847            }
34848            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
34849            MISSION_ITEM_INT_DATA::ID => {
34850                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
34851            }
34852            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
34853            CAMERA_SETTINGS_DATA::ID => {
34854                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34855            }
34856            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
34857            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34858            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34859            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34860            DISTANCE_SENSOR_DATA::ID => {
34861                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34862            }
34863            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
34864                MISSION_ITEM_REACHED_DATA::default(),
34865            )),
34866            RC_CHANNELS_SCALED_DATA::ID => {
34867                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
34868            }
34869            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
34870            AUTOPILOT_VERSION_DATA::ID => {
34871                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34872            }
34873            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34874                VICON_POSITION_ESTIMATE_DATA::default(),
34875            )),
34876            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
34877                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
34878            )),
34879            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34880                VIDEO_STREAM_INFORMATION_DATA::default(),
34881            )),
34882            LOGGING_DATA_ACKED_DATA::ID => {
34883                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
34884            }
34885            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
34886            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
34887            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
34888            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34889            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34890            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
34891            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
34892                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
34893            )),
34894            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
34895            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34896            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
34897            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
34898                COMMAND_LONG_STAMPED_DATA::default(),
34899            )),
34900            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34901                ATTITUDE_QUATERNION_DATA::default(),
34902            )),
34903            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34904                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34905            )),
34906            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
34907                POSITION_TARGET_LOCAL_NED_DATA::default(),
34908            )),
34909            SENS_POWER_BOARD_DATA::ID => {
34910                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
34911            }
34912            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
34913            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
34914            MANUAL_SETPOINT_DATA::ID => {
34915                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
34916            }
34917            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
34918            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34919            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34920                VIDEO_STREAM_STATUS_DATA::default(),
34921            )),
34922            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
34923            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34924                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34925            )),
34926            SET_HOME_POSITION_DATA::ID => {
34927                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
34928            }
34929            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34930                SAFETY_SET_ALLOWED_AREA_DATA::default(),
34931            )),
34932            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34933                CHANGE_OPERATOR_CONTROL_DATA::default(),
34934            )),
34935            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
34936            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
34937            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34938                STORAGE_INFORMATION_DATA::default(),
34939            )),
34940            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
34941            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
34942            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
34943                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
34944            )),
34945            SCALED_PRESSURE_DATA::ID => {
34946                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
34947            }
34948            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
34949            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34950                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
34951            )),
34952            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
34953                OPEN_DRONE_ID_LOCATION_DATA::default(),
34954            )),
34955            DEBUG_FLOAT_ARRAY_DATA::ID => {
34956                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34957            }
34958            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34959                RESPONSE_EVENT_ERROR_DATA::default(),
34960            )),
34961            CELLULAR_CONFIG_DATA::ID => {
34962                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34963            }
34964            GPS_GLOBAL_ORIGIN_DATA::ID => {
34965                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
34966            }
34967            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34968            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
34969                PARAM_EXT_REQUEST_READ_DATA::default(),
34970            )),
34971            ATTITUDE_TARGET_DATA::ID => {
34972                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34973            }
34974            EXTENDED_SYS_STATE_DATA::ID => {
34975                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34976            }
34977            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
34978                COMMAND_INT_STAMPED_DATA::default(),
34979            )),
34980            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34981                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
34982            )),
34983            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
34984                GIMBAL_MANAGER_STATUS_DATA::default(),
34985            )),
34986            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34987                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
34988            )),
34989            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34990            MOUNT_ORIENTATION_DATA::ID => {
34991                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
34992            }
34993            FLIGHT_INFORMATION_DATA::ID => {
34994                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34995            }
34996            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34997                GIMBAL_DEVICE_INFORMATION_DATA::default(),
34998            )),
34999            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35000            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
35001            CAMERA_FOV_STATUS_DATA::ID => {
35002                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35003            }
35004            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35005                CONTROL_SYSTEM_STATE_DATA::default(),
35006            )),
35007            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35008                PARAM_EXT_REQUEST_LIST_DATA::default(),
35009            )),
35010            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35011                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35012            )),
35013            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35014                SAFETY_ALLOWED_AREA_DATA::default(),
35015            )),
35016            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35017                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35018                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35019                ))
35020            }
35021            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35022            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35023            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35024                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35025            )),
35026            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35027                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35028                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35029                ))
35030            }
35031            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35032            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35033                AVAILABLE_MODES_MONITOR_DATA::default(),
35034            )),
35035            TERRAIN_REQUEST_DATA::ID => {
35036                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35037            }
35038            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35039                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35040            )),
35041            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35042            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35043            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35044                MISSION_REQUEST_INT_DATA::default(),
35045            )),
35046            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35047            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35048            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35049                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35050            )),
35051            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35052            CAMERA_INFORMATION_DATA::ID => {
35053                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35054            }
35055            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35056            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35057                MISSION_REQUEST_LIST_DATA::default(),
35058            )),
35059            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35060            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35061            PARAM_REQUEST_READ_DATA::ID => {
35062                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35063            }
35064            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35065                CAMERA_IMAGE_CAPTURED_DATA::default(),
35066            )),
35067            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35068                SET_ATTITUDE_TARGET_DATA::default(),
35069            )),
35070            UAVCAN_NODE_INFO_DATA::ID => {
35071                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35072            }
35073            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35074            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35075            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35076                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35077                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35078                ))
35079            }
35080            GSM_LINK_STATUS_DATA::ID => {
35081                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
35082            }
35083            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35084                UTM_GLOBAL_POSITION_DATA::default(),
35085            )),
35086            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35087            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35088                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35089            )),
35090            UAVCAN_NODE_STATUS_DATA::ID => {
35091                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35092            }
35093            HIL_RC_INPUTS_RAW_DATA::ID => {
35094                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35095            }
35096            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35097                ONBOARD_COMPUTER_STATUS_DATA::default(),
35098            )),
35099            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35100            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35101            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35102            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35103                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35104                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35105                ))
35106            }
35107            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35108                ORBIT_EXECUTION_STATUS_DATA::default(),
35109            )),
35110            LINK_NODE_STATUS_DATA::ID => {
35111                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35112            }
35113            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35114                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35115            )),
35116            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35117                ATTITUDE_QUATERNION_COV_DATA::default(),
35118            )),
35119            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35120            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35121            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35122            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
35123            FW_SOARING_DATA_DATA::ID => {
35124                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
35125            }
35126            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35127            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35128            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35129                MISSION_SET_CURRENT_DATA::default(),
35130            )),
35131            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35132                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35133            )),
35134            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35135                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35136                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35137                ))
35138            }
35139            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35140            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35141            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35142            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35143                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35144            )),
35145            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35146                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35147            )),
35148            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35149            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35150                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35151                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35152                ))
35153            }
35154            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35155            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35156                HIL_STATE_QUATERNION_DATA::default(),
35157            )),
35158            LOG_REQUEST_DATA_DATA::ID => {
35159                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35160            }
35161            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35162                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35163            )),
35164            OPTICAL_FLOW_RAD_DATA::ID => {
35165                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35166            }
35167            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35168            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35169            PROTOCOL_VERSION_DATA::ID => {
35170                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35171            }
35172            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35173                CURRENT_EVENT_SEQUENCE_DATA::default(),
35174            )),
35175            RC_CHANNELS_RAW_DATA::ID => {
35176                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35177            }
35178            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
35179                SENSOR_AIRFLOW_ANGLES_DATA::default(),
35180            )),
35181            GENERATOR_STATUS_DATA::ID => {
35182                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35183            }
35184            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35185            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35186            LOG_REQUEST_END_DATA::ID => {
35187                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35188            }
35189            CAN_FILTER_MODIFY_DATA::ID => {
35190                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35191            }
35192            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35193                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35194            )),
35195            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35196                CAMERA_CAPTURE_STATUS_DATA::default(),
35197            )),
35198            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
35199            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35200                COMPONENT_INFORMATION_BASIC_DATA::default(),
35201            )),
35202            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35203            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35204                RC_CHANNELS_OVERRIDE_DATA::default(),
35205            )),
35206            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35207            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35208                GLOBAL_POSITION_INT_DATA::default(),
35209            )),
35210            LOG_REQUEST_LIST_DATA::ID => {
35211                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35212            }
35213            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35214            SMART_BATTERY_INFO_DATA::ID => {
35215                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35216            }
35217            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35218            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35219            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35220                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35221            )),
35222            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35223            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35224                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35225            )),
35226            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35227            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35228            COMPONENT_METADATA_DATA::ID => {
35229                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35230            }
35231            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
35232            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
35233            SUPPORTED_TUNES_DATA::ID => {
35234                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35235            }
35236            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35237            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35238                COMPONENT_INFORMATION_DATA::default(),
35239            )),
35240            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35241            SENSORPOD_STATUS_DATA::ID => {
35242                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
35243            }
35244            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35245            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35246            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35247            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35248                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35249            )),
35250            LOCAL_POSITION_NED_DATA::ID => {
35251                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35252            }
35253            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35254            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35255                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35256            )),
35257            SCALED_PRESSURE3_DATA::ID => {
35258                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35259            }
35260            NAMED_VALUE_FLOAT_DATA::ID => {
35261                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35262            }
35263            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35264                FILE_TRANSFER_PROTOCOL_DATA::default(),
35265            )),
35266            SCALED_PRESSURE2_DATA::ID => {
35267                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35268            }
35269            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35270            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35271            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35272            SERVO_OUTPUT_RAW_DATA::ID => {
35273                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35274            }
35275            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
35276            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35277            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
35278            GPS_INJECT_DATA_DATA::ID => {
35279                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35280            }
35281            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35282                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35283            )),
35284            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35285            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35286            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35287            HIL_OPTICAL_FLOW_DATA::ID => {
35288                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35289            }
35290            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35291            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35292            ILLUMINATOR_STATUS_DATA::ID => {
35293                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35294            }
35295            NAMED_VALUE_INT_DATA::ID => {
35296                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35297            }
35298            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35299            OBSTACLE_DISTANCE_DATA::ID => {
35300                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35301            }
35302            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35303                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35304            )),
35305            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35306            _ => None,
35307        }
35308    }
35309    #[cfg(feature = "arbitrary")]
35310    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35311        match id {
35312            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35313            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35314            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35315                LOCAL_POSITION_NED_COV_DATA::random(rng),
35316            )),
35317            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35318                VISION_POSITION_ESTIMATE_DATA::random(rng),
35319            )),
35320            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35321            MESSAGE_INTERVAL_DATA::ID => {
35322                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35323            }
35324            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35325                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35326            )),
35327            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35328            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35329                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35330            )),
35331            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
35332            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35333                PARAM_REQUEST_LIST_DATA::random(rng),
35334            )),
35335            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35336            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35337            HYGROMETER_SENSOR_DATA::ID => {
35338                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35339            }
35340            CELLULAR_STATUS_DATA::ID => {
35341                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35342            }
35343            MISSION_CLEAR_ALL_DATA::ID => {
35344                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35345            }
35346            MISSION_CURRENT_DATA::ID => {
35347                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35348            }
35349            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35350            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35351            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35352                VISION_SPEED_ESTIMATE_DATA::random(rng),
35353            )),
35354            RESOURCE_REQUEST_DATA::ID => {
35355                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35356            }
35357            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35358                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35359            )),
35360            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35361                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35362            )),
35363            ESTIMATOR_STATUS_DATA::ID => {
35364                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35365            }
35366            ISBD_LINK_STATUS_DATA::ID => {
35367                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35368            }
35369            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35370            ENCAPSULATED_DATA_DATA::ID => {
35371                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35372            }
35373            PARAM_EXT_VALUE_DATA::ID => {
35374                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35375            }
35376            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35377            MISSION_REQUEST_DATA::ID => {
35378                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35379            }
35380            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
35381                SATCOM_LINK_STATUS_DATA::random(rng),
35382            )),
35383            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35384            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35385                CAMERA_THERMAL_RANGE_DATA::random(rng),
35386            )),
35387            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35388                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35389            )),
35390            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35391                REQUEST_DATA_STREAM_DATA::random(rng),
35392            )),
35393            AVAILABLE_MODES_DATA::ID => {
35394                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35395            }
35396            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35397            MISSION_ITEM_INT_DATA::ID => {
35398                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35399            }
35400            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
35401            CAMERA_SETTINGS_DATA::ID => {
35402                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35403            }
35404            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35405            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35406            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35407            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35408            DISTANCE_SENSOR_DATA::ID => {
35409                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35410            }
35411            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35412                MISSION_ITEM_REACHED_DATA::random(rng),
35413            )),
35414            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35415                RC_CHANNELS_SCALED_DATA::random(rng),
35416            )),
35417            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35418            AUTOPILOT_VERSION_DATA::ID => {
35419                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35420            }
35421            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35422                VICON_POSITION_ESTIMATE_DATA::random(rng),
35423            )),
35424            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35425                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35426            )),
35427            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35428                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35429            )),
35430            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35431                LOGGING_DATA_ACKED_DATA::random(rng),
35432            )),
35433            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35434            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35435            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35436            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35437            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35438            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35439            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35440                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35441            )),
35442            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35443            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35444            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35445            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
35446                COMMAND_LONG_STAMPED_DATA::random(rng),
35447            )),
35448            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35449                ATTITUDE_QUATERNION_DATA::random(rng),
35450            )),
35451            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35452                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35453            )),
35454            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35455                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35456            )),
35457            SENS_POWER_BOARD_DATA::ID => {
35458                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
35459            }
35460            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35461            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35462            MANUAL_SETPOINT_DATA::ID => {
35463                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35464            }
35465            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35466            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35467            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35468                VIDEO_STREAM_STATUS_DATA::random(rng),
35469            )),
35470            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35471            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35472                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35473            )),
35474            SET_HOME_POSITION_DATA::ID => {
35475                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35476            }
35477            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35478                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35479            )),
35480            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35481                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35482            )),
35483            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35484            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35485            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35486                STORAGE_INFORMATION_DATA::random(rng),
35487            )),
35488            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35489            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35490            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35491                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35492            )),
35493            SCALED_PRESSURE_DATA::ID => {
35494                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35495            }
35496            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35497            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35498                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35499            )),
35500            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35501                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35502            )),
35503            DEBUG_FLOAT_ARRAY_DATA::ID => {
35504                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35505            }
35506            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35507                RESPONSE_EVENT_ERROR_DATA::random(rng),
35508            )),
35509            CELLULAR_CONFIG_DATA::ID => {
35510                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35511            }
35512            GPS_GLOBAL_ORIGIN_DATA::ID => {
35513                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35514            }
35515            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35516            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35517                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35518            )),
35519            ATTITUDE_TARGET_DATA::ID => {
35520                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35521            }
35522            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35523                EXTENDED_SYS_STATE_DATA::random(rng),
35524            )),
35525            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
35526                COMMAND_INT_STAMPED_DATA::random(rng),
35527            )),
35528            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35529                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35530            )),
35531            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35532                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35533            )),
35534            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35535                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35536            )),
35537            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35538            MOUNT_ORIENTATION_DATA::ID => {
35539                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35540            }
35541            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35542                FLIGHT_INFORMATION_DATA::random(rng),
35543            )),
35544            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35545                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35546            )),
35547            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35548            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
35549            CAMERA_FOV_STATUS_DATA::ID => {
35550                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35551            }
35552            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35553                CONTROL_SYSTEM_STATE_DATA::random(rng),
35554            )),
35555            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35556                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35557            )),
35558            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35559                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35560            )),
35561            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35562                SAFETY_ALLOWED_AREA_DATA::random(rng),
35563            )),
35564            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35565                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35566                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35567                ))
35568            }
35569            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35570            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35571            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35572                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35573            )),
35574            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35575                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35576                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35577                ))
35578            }
35579            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35580            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35581                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35582            )),
35583            TERRAIN_REQUEST_DATA::ID => {
35584                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35585            }
35586            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35587                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35588            )),
35589            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35590            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35591            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35592                MISSION_REQUEST_INT_DATA::random(rng),
35593            )),
35594            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35595            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35596            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35597                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35598            )),
35599            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35600            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35601                CAMERA_INFORMATION_DATA::random(rng),
35602            )),
35603            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35604            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35605                MISSION_REQUEST_LIST_DATA::random(rng),
35606            )),
35607            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35608            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35609            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35610                PARAM_REQUEST_READ_DATA::random(rng),
35611            )),
35612            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35613                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35614            )),
35615            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35616                SET_ATTITUDE_TARGET_DATA::random(rng),
35617            )),
35618            UAVCAN_NODE_INFO_DATA::ID => {
35619                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35620            }
35621            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35622            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35623            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35624                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35625                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35626                ))
35627            }
35628            GSM_LINK_STATUS_DATA::ID => {
35629                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
35630            }
35631            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35632                UTM_GLOBAL_POSITION_DATA::random(rng),
35633            )),
35634            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35635            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35636                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35637            )),
35638            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35639                UAVCAN_NODE_STATUS_DATA::random(rng),
35640            )),
35641            HIL_RC_INPUTS_RAW_DATA::ID => {
35642                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35643            }
35644            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35645                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35646            )),
35647            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35648            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35649            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35650            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35651                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35652                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35653                ))
35654            }
35655            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35656                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35657            )),
35658            LINK_NODE_STATUS_DATA::ID => {
35659                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35660            }
35661            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35662                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35663            )),
35664            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35665                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35666            )),
35667            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35668            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35669            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35670            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
35671            FW_SOARING_DATA_DATA::ID => {
35672                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
35673            }
35674            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35675            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35676            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35677                MISSION_SET_CURRENT_DATA::random(rng),
35678            )),
35679            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35680                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35681            )),
35682            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35683                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35684                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35685                ))
35686            }
35687            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35688            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35689            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35690            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35691                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35692            )),
35693            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35694                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35695            )),
35696            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35697            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35698                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35699                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35700                ))
35701            }
35702            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35703            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35704                HIL_STATE_QUATERNION_DATA::random(rng),
35705            )),
35706            LOG_REQUEST_DATA_DATA::ID => {
35707                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35708            }
35709            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35710                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35711            )),
35712            OPTICAL_FLOW_RAD_DATA::ID => {
35713                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35714            }
35715            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35716            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35717            PROTOCOL_VERSION_DATA::ID => {
35718                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35719            }
35720            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35721                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35722            )),
35723            RC_CHANNELS_RAW_DATA::ID => {
35724                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35725            }
35726            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
35727                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
35728            )),
35729            GENERATOR_STATUS_DATA::ID => {
35730                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35731            }
35732            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35733            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35734            LOG_REQUEST_END_DATA::ID => {
35735                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35736            }
35737            CAN_FILTER_MODIFY_DATA::ID => {
35738                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35739            }
35740            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35741                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35742            )),
35743            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35744                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35745            )),
35746            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
35747            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35748                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35749            )),
35750            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35751            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35752                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35753            )),
35754            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35755            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35756                GLOBAL_POSITION_INT_DATA::random(rng),
35757            )),
35758            LOG_REQUEST_LIST_DATA::ID => {
35759                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35760            }
35761            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35762            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35763                SMART_BATTERY_INFO_DATA::random(rng),
35764            )),
35765            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35766            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35767            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35768                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35769            )),
35770            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35771            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35772                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35773            )),
35774            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35775            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35776            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35777                COMPONENT_METADATA_DATA::random(rng),
35778            )),
35779            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
35780            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
35781            SUPPORTED_TUNES_DATA::ID => {
35782                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35783            }
35784            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35785            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35786                COMPONENT_INFORMATION_DATA::random(rng),
35787            )),
35788            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35789            SENSORPOD_STATUS_DATA::ID => {
35790                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
35791            }
35792            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35793            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35794            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35795            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35796                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35797            )),
35798            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35799                LOCAL_POSITION_NED_DATA::random(rng),
35800            )),
35801            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35802            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35803                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35804            )),
35805            SCALED_PRESSURE3_DATA::ID => {
35806                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35807            }
35808            NAMED_VALUE_FLOAT_DATA::ID => {
35809                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35810            }
35811            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35812                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35813            )),
35814            SCALED_PRESSURE2_DATA::ID => {
35815                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35816            }
35817            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35818            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35819            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35820            SERVO_OUTPUT_RAW_DATA::ID => {
35821                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35822            }
35823            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
35824            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35825            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
35826            GPS_INJECT_DATA_DATA::ID => {
35827                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35828            }
35829            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35830                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35831            )),
35832            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35833            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35834            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35835            HIL_OPTICAL_FLOW_DATA::ID => {
35836                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35837            }
35838            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35839            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35840            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35841                ILLUMINATOR_STATUS_DATA::random(rng),
35842            )),
35843            NAMED_VALUE_INT_DATA::ID => {
35844                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35845            }
35846            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35847            OBSTACLE_DISTANCE_DATA::ID => {
35848                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35849            }
35850            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35851                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35852            )),
35853            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35854            _ => None,
35855        }
35856    }
35857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35858        match self {
35859            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35860            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35861            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
35862            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35863            Self::PLAY_TUNE(body) => body.ser(version, bytes),
35864            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
35865            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35866            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35867            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35868            Self::SENS_MPPT(body) => body.ser(version, bytes),
35869            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
35870            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35871            Self::DATA_STREAM(body) => body.ser(version, bytes),
35872            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
35873            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35874            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
35875            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
35876            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
35877            Self::TUNNEL(body) => body.ser(version, bytes),
35878            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
35879            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
35880            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
35881            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35882            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35883            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
35884            Self::LOG_DATA(body) => body.ser(version, bytes),
35885            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35886            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
35887            Self::TIMESYNC(body) => body.ser(version, bytes),
35888            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
35889            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
35890            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35891            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35892            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35893            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
35894            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35895            Self::LOG_ENTRY(body) => body.ser(version, bytes),
35896            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
35897            Self::SENS_POWER(body) => body.ser(version, bytes),
35898            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35899            Self::GPS2_RAW(body) => body.ser(version, bytes),
35900            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35901            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35902            Self::DEBUG(body) => body.ser(version, bytes),
35903            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35904            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
35905            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
35906            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
35907            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35908            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35909            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
35910            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
35911            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
35912            Self::HOME_POSITION(body) => body.ser(version, bytes),
35913            Self::SCALED_IMU3(body) => body.ser(version, bytes),
35914            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
35915            Self::ESC_INFO(body) => body.ser(version, bytes),
35916            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35917            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
35918            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
35919            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35920            Self::ALTITUDE(body) => body.ser(version, bytes),
35921            Self::SYS_STATUS(body) => body.ser(version, bytes),
35922            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
35923            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35924            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35925            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35926            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
35927            Self::STATUSTEXT(body) => body.ser(version, bytes),
35928            Self::RAW_IMU(body) => body.ser(version, bytes),
35929            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
35930            Self::SIM_STATE(body) => body.ser(version, bytes),
35931            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35932            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
35933            Self::ODOMETRY(body) => body.ser(version, bytes),
35934            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35935            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
35936            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
35937            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35938            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
35939            Self::WINCH_STATUS(body) => body.ser(version, bytes),
35940            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
35941            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
35942            Self::MISSION_COUNT(body) => body.ser(version, bytes),
35943            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35944            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
35945            Self::MISSION_ACK(body) => body.ser(version, bytes),
35946            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
35947            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
35948            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35949            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
35950            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35951            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35952            Self::EFI_STATUS(body) => body.ser(version, bytes),
35953            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
35954            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35955            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35956            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
35957            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35958            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35959            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35960            Self::COLLISION(body) => body.ser(version, bytes),
35961            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
35962            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35963            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35964            Self::WIND_COV(body) => body.ser(version, bytes),
35965            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
35966            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35967            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35968            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
35969            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
35970            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
35971            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35972            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
35973            Self::LOG_ERASE(body) => body.ser(version, bytes),
35974            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35975            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35976            Self::MEMORY_VECT(body) => body.ser(version, bytes),
35977            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35978            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
35979            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
35980            Self::SCALED_IMU2(body) => body.ser(version, bytes),
35981            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
35982            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
35983            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
35984            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
35985            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35986            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
35987            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35988            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35989            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
35990            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35991            Self::RAW_RPM(body) => body.ser(version, bytes),
35992            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
35993            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35994            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
35995            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
35996            Self::RC_CHANNELS(body) => body.ser(version, bytes),
35997            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35998            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35999            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
36000            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36001            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36002            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36003            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36004            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36005            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36006            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36007            Self::GPS_STATUS(body) => body.ser(version, bytes),
36008            Self::VIBRATION(body) => body.ser(version, bytes),
36009            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36010            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36011            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36012            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36013            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36014            Self::HEARTBEAT(body) => body.ser(version, bytes),
36015            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36016            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36017            Self::SENS_BATMON(body) => body.ser(version, bytes),
36018            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
36019            Self::ATTITUDE(body) => body.ser(version, bytes),
36020            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36021            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36022            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36023            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36024            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36025            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36026            Self::GPS2_RTK(body) => body.ser(version, bytes),
36027            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36028            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36029            Self::GPS_INPUT(body) => body.ser(version, bytes),
36030            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36031            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36032            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36033            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36034            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36035            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36036            Self::POWER_STATUS(body) => body.ser(version, bytes),
36037            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36038            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36039            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36040            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36041            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
36042            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36043            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36044            Self::VFR_HUD(body) => body.ser(version, bytes),
36045            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36046            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36047            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36048            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36049            Self::SENS_ATMOS(body) => body.ser(version, bytes),
36050            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36051            Self::SCALED_IMU(body) => body.ser(version, bytes),
36052            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36053            Self::AUTH_KEY(body) => body.ser(version, bytes),
36054            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36055            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36056            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36057            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36058            Self::ESC_STATUS(body) => body.ser(version, bytes),
36059            Self::CAN_FRAME(body) => body.ser(version, bytes),
36060            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36061            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36062            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36063            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36064            Self::HIL_GPS(body) => body.ser(version, bytes),
36065            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36066            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
36067            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
36068            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36069            Self::PING(body) => body.ser(version, bytes),
36070            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36071            Self::GPS_RTK(body) => body.ser(version, bytes),
36072            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
36073            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36074            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36075            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36076            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36077            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36078            Self::SET_MODE(body) => body.ser(version, bytes),
36079            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36080            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36081            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36082            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36083            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36084            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36085            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36086            Self::COMMAND_INT(body) => body.ser(version, bytes),
36087            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36088            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
36089            Self::HIL_STATE(body) => body.ser(version, bytes),
36090            Self::EKF_EXT(body) => body.ser(version, bytes),
36091            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36092            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36093            Self::PARAM_SET(body) => body.ser(version, bytes),
36094            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36095            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36096            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36097            Self::EVENT(body) => body.ser(version, bytes),
36098            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36099            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36100            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36101            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36102            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36103            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36104            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36105        }
36106    }
36107    fn extra_crc(id: u32) -> u8 {
36108        match id {
36109            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36110            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36111            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36112            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36113            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36114            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36115            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36116            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36117            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36118            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
36119            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36120            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36121            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36122            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36123            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36124            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36125            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36126            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36127            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36128            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36129            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36130            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36131            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36132            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36133            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36134            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36135            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36136            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36137            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36138            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36139            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
36140            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36141            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36142            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36143            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36144            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36145            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36146            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36147            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
36148            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36149            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36150            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36151            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36152            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36153            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36154            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36155            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36156            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36157            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36158            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36159            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36160            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36161            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36162            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36163            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36164            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36165            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36166            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36167            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36168            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36169            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36170            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36171            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36172            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
36173            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36174            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36175            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36176            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
36177            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36178            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36179            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36180            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36181            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36182            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36183            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36184            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36185            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36186            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36187            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36188            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36189            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36190            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36191            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36192            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36193            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36194            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36195            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36196            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36197            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36198            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36199            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36200            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36201            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36202            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36203            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36204            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36205            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36206            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
36207            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36208            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36209            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36210            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36211            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36212            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36213            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36214            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36215            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
36216            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36217            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36218            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36219            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36220            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36221            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36222                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36223            }
36224            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36225            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36226            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36227            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36228                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36229            }
36230            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36231            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36232            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36233            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36234            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36235            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36236            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36237            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36238            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36239            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36240            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36241            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36242            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36243            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36244            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36245            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36246            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36247            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36248            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36249            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36250            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36251            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36252            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36253                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36254            }
36255            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
36256            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36257            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36258            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36259            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36260            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36261            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36262            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36263            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36264            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36265            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36266                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36267            }
36268            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36269            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36270            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36271            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36272            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36273            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36274            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36275            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
36276            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
36277            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36278            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36279            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36280            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36281            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36282                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36283            }
36284            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36285            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36286            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36287            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36288                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36289            }
36290            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36291            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36292            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36293                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36294            }
36295            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36296            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36297            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36298            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36299            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36300            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36301            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36302            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36303            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36304            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36305            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
36306            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36307            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36308            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36309            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36310            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36311            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36312            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36313            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
36314            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36315            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36316            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36317            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36318            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36319            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36320            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36321            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36322            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36323            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36324            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36325            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36326            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36327            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36328            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36329            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36330            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
36331            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
36332            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36333            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36334            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36335            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36336            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
36337            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36338            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36339            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36340            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36341            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36342            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36343            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36344            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36345            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36346            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36347            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36348            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36349            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36350            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36351            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36352            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
36353            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36354            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
36355            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36356            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36357            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36358            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36359            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36360            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36361            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36362            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36363            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36364            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36365            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36366            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36367            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36368            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36369            _ => 0,
36370        }
36371    }
36372    fn target_system_id(&self) -> Option<u8> {
36373        match self {
36374            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36375            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36376            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36377            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36378            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36379            Self::TUNNEL(inner) => Some(inner.target_system),
36380            Self::TIMESYNC(inner) => Some(inner.target_system),
36381            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36382            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36383            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36384            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36385            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36386            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36387            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36388            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
36389            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36390            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36391            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36392            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36393            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36394            Self::MISSION_ACK(inner) => Some(inner.target_system),
36395            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36396            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36397            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36398            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36399            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
36400            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36401            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36402            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36403            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36404            Self::LOG_ERASE(inner) => Some(inner.target_system),
36405            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36406            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36407            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36408            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36409            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36410            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36411            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36412            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36413            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36414            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36415            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36416            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36417            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36418            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36419            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36420            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36421            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36422            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36423            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36424            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36425            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36426            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36427            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36428            Self::CAN_FRAME(inner) => Some(inner.target_system),
36429            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36430            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36431            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36432            Self::PING(inner) => Some(inner.target_system),
36433            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36434            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36435            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36436            Self::SET_MODE(inner) => Some(inner.target_system),
36437            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36438            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36439            Self::COMMAND_INT(inner) => Some(inner.target_system),
36440            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36441            Self::PARAM_SET(inner) => Some(inner.target_system),
36442            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36443            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36444            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36445            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36446            _ => None,
36447        }
36448    }
36449    fn target_component_id(&self) -> Option<u8> {
36450        match self {
36451            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36452            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36453            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36454            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36455            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36456            Self::TUNNEL(inner) => Some(inner.target_component),
36457            Self::TIMESYNC(inner) => Some(inner.target_component),
36458            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36459            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36460            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36461            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36462            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36463            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36464            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36465            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
36466            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36467            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36468            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36469            Self::MISSION_ACK(inner) => Some(inner.target_component),
36470            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36471            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36472            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36473            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36474            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
36475            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36476            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36477            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36478            Self::LOG_ERASE(inner) => Some(inner.target_component),
36479            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36480            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36481            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36482            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36483            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36484            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36485            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36486            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36487            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36488            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36489            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36490            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36491            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36492            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36493            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36494            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36495            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36496            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36497            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36498            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36499            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36500            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36501            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36502            Self::CAN_FRAME(inner) => Some(inner.target_component),
36503            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36504            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36505            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36506            Self::PING(inner) => Some(inner.target_component),
36507            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36508            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36509            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36510            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36511            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36512            Self::COMMAND_INT(inner) => Some(inner.target_component),
36513            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36514            Self::PARAM_SET(inner) => Some(inner.target_component),
36515            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36516            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36517            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36518            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36519            _ => None,
36520        }
36521    }
36522}